Following error has showed up all of a sudden:
QWidget: Cannot create a QWidget without QApplication
It was working fine and I have QApplication
included and a QApplication
object declared before MainWindow
, but the error is still there.
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}