1

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();
}
cbuchart
  • 10,847
  • 9
  • 53
  • 93
Ness
  • 158
  • 1
  • 12

0 Answers0