[Qgis-developer] Qgis standalone apps

Massimo Di Stefano massimodisasha at yahoo.it
Wed Sep 15 09:49:42 EDT 2010


Hi Noli,


i tried this one :

http://www.geofemengineering.it/data/qgistry2.py

it works, i have the example running, thanks!

one problem when i quit the app, i have a crash when i try to close the app.

this the log :

python /qgistry2.py
QPixmap: Must construct a QApplication before a QPaintDevice
Abort trap


thanks for you support,

Massimo.



Il giorno 15/set/2010, alle ore 15.17, Noli Sicad ha scritto:

> Try this. Noli
> 
> ~~~~~~~~~
> 
> def main(argv):
> 
>    app = QApplication(argv)
> 
>    QgsApplication.setPrefixPath("/usr/local/qgis1.6.0.app/Contents/MacOS/",
> True)
>    QgsApplication.initQgis()
> 
> 
>    wnd = MyWnd()
>    wnd.move(100,100)
>    wnd.show()
> 
> 
>    retval = app.exec_()
> 
> 
>    QgsApplication.exitQgis()
>    sys.exit(retval)
> 
> 
> if __name__ == "__main__":
>    main(sys.argv)



More information about the Qgis-developer mailing list