I have migrated my solution from Qt4.8 to Qt5.0.1, after fixing the compilation and linking errors i got a run time error as follows
QPixmap: Must construct a QApplication before a QPaintDevice
error message.png
taking in to consideration that the application was running before migrating to Qt5.0.1 and i am sure that i am constructing the QApplication in the first line in the main method as follows
int main(argc, argv)
{
std::unique_ptr<QApplication> app(new QApplication(argc, argv));
.
.
.
.
std::unique_ptr<MyMainForm> form(new MyMainForm(NULL));
.
.
.
return app.exec();
}
I tried to reproduce the problem in a smaller solution but it didn't appear, any suggestions will be welcomed.
I debugged the ui_MyMainForm.h file and the code that causes the error is
iconLabel->setPixmap(QPixmap(QString::fromUtf8(":/icons/icons/image.png")));
working environment
Qt5.0.1 with MSVisual studio 2010 x86
Windows 7 x64
Bookmarks