Hi Jachym, you have to do next things in demo_app.py:<br><br>1. Line 11: Use qgis_prefix = "/usr" instead of "qgis_prefix = os.getenv("QGISHOME")". I don't know why last mode doesn't work for me. <br>
2. Line 14: You have __init_ instead of __init__. (Important! Your GUI doesn't initialize)<br>3. Line 28: useQImageToRender doesn't exists, use useImageToRender.<br>4. Line 56: Use mActionPan.png instead of mActionZoomPan.png<br>
5. Line 61: Use mActionZoomFullExtent.png instead of mActionZoomFull.png<br>6. Line 76 and 77: You have QgsMapToolPan but you want create Zoom Tool, so replace it with QgsMapToolZoom.<br>7. Line 89: Replace zoomFullExtent with zoomToFullExtent.<br>
8. Line 106: You have a sintaxis error there: Use addMapLayer, not adMapLayer.<br>9. Be carefull, every single word in your code is important.<br>10. Read again 9.<br><br>Yes, I'm on vacations... :)<br><br>Germán.<br>
<br><div class="gmail_quote">2009/3/29 Jachym Cepicky <span dir="ltr"><<a href="mailto:jachym.cepicky@gmail.com">jachym.cepicky@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
I followed the guide in QGIS Book [1] (pages 161-167), "Creating PyQGIS<br>
Applications" and I somehow did not get the desired result.<br>
<br>
I get only one "empty" window, but no qgis-based application. Could<br>
anyone point me to the bug, I probably did? Files attached.<br>
<br>
I'm running it as follows:<br>
<br>
Qgis (1.1.0), installed from debian package (custom compilation) in the<br>
system the standard way.<br>
<br>
export QGISHOME=/usr/<br>
export PYTHONPATH=/usr/share/qgis/python/<br>
python demo_app.py<br>
<br>
Thanks<br>
<br>
Jachym<br>
<br>
[1]<br>
<a href="http://download.osgeo.org/qgis/doc/manual/qgis-1.0.0_user_guide_en.pdf" target="_blank">http://download.osgeo.org/qgis/doc/manual/qgis-1.0.0_user_guide_en.pdf</a><br>
<font color="#888888">--<br>
Jachym Cepicky<br>
e-mail: jachym.cepicky gmail com<br>
URL: <a href="http://les-ejk.cz" target="_blank">http://les-ejk.cz</a><br>
GPG: <a href="http://www.les-ejk.cz/pgp/JachymCepicky.pgp" target="_blank">http://www.les-ejk.cz/pgp/JachymCepicky.pgp</a><br>
Key fingerprint: 0C6D 0EAE 76BD 506C F299  ED8A C8AB 74B8 08D4 E08F<br>
</font><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
<br>
iEYEARECAAYFAknPe20ACgkQyKt0uAjU4I/hQwCbBZY2PkC/dvJcJXQ/pnsoat9F<br>
t50AoMFm2mKRQ9bWafXzjwqK8DX76ji2<br>
=ASH8<br>
-----END PGP SIGNATURE-----<br>
<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>-----------<br>   |\__  <br>(:>__)(<br>   |/    <br><br>Soluciones Geoinformáticas Libres                            <br><a href="http://geotux.tuxfamily.org/">http://geotux.tuxfamily.org/</a><br>
<br>