Hello,
I upgraded my application from Qt3.3 to Qt4.4. I have the following problem when the Qt4.4 program is running.
- In release mode, it works fine;;
- In debug mode, compilation and link is ok. However, when it runs, it pops up a error message:
QPixmap: Must construct a Qapplication before a QpaintDevice.
Following is the code in my main program and the error happened at :
MainWindow smw;
But I create QApplication before it already!
- also, the release version can work ...
Can anyone help me why this happened and how to solve it?
thank you very much!
int main( int argc, char ** argv )
{
try
{
MainWindow smw;
app.setMainWidget( &smw );
smw.hide();
...
}
...
}
int main( int argc, char ** argv )
{
try
{
QApplication app( argc, argv );
MainWindow smw;
app.setMainWidget( &smw );
smw.hide();
...
}
...
}
To copy to clipboard, switch view to plain text mode
Bookmarks