[Qgis-user] Problem refreshing map canvas with pyqgis

Sylvie Perdriel sperdriel at cairn-dev.fr
Thu Mar 20 09:09:55 PDT 2014


Thank you Sylvain for you answer,you are right. I realise that if I show
the window after loading the shape file, the canvas has not the right
dimensions.

Have a nice day,

Sylvie



*De :* PIERRE Sylvain [mailto:sylvain.pierre at cg67.fr]
*Envoyé :* jeudi 20 mars 2014 15:55
*À :* Sylvie Perdriel; qgis-user at lists.osgeo.org
*Objet :* RE: [Qgis-user] Problem refreshing map canvas with pyqgis



May-be you’d better show first the window, load the layer and refresh the
canvas NOT the window



Sylvain









*De :* qgis-user-bounces at lists.osgeo.org [
mailto:qgis-user-bounces at lists.osgeo.org <qgis-user-bounces at lists.osgeo.org>]
*De la part de* Sylvie Perdriel
*Envoyé :* jeudi 20 mars 2014 14:24
*À :* qgis-user at lists.osgeo.org
*Objet :* [Qgis-user] Problem refreshing map canvas with pyqgis



Hello Every Body,



I’d like to develop a standalone application for air pollution modeling
based on pyqgis. I installed QGIs version 2.2 on windows 7 64bits from
osgeo installer and my development platform is Eclispe/pydev.

As a first step, I’m trying to load a shapefile and plot it on a
qgsmapcanvas (see attached python code) : the shapefile is properly  loaded
but I can see it plotted only after minimizing the window and restoring it.
I have tried to add repaint(), refresh() calls on the qgsmapcanvas or the
window without any success. I must surely miss something simple and would
appreciate some help if possible.

Thank you in advanced and best regards,



Sylvie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140320/9c89df6a/attachment.html>


More information about the Qgis-user mailing list