On Mon, May 9, 2011 at 10:53 AM, sttsx <[email protected]> wrote:
> ________________
> Debug Error
> Program:...
> Module:4.7.2
> Fine:global\qglobal.cpp
> Line:2262
>
> QWidget:Must construct a QApplication before a QPaintDevice.
> _________________
>
> The main function of my appliaction is:
>
> int main(int argc,char *argv[]){
> QgsApplication app(argc,argv,TRUE);
> MainWindow* mypMainWindow = new MainWindow();   //
> mypMainWindow->show();
> app.exec();
> }

Does it help if you change QgsApplication to QApplication? If not, you
are doing probably something wrong, like having a global or static
variable inherited from QWidget which tries to initialize itself
before the application actually starts.

Martin
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to