Then you do not have a Qt program, i.e. no QApplication at all, or you are trying to create the QEventLoop before you have created your QApplication instance.