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:[email protected]] *Envoyé :* jeudi 20 mars 2014 15:55 *À :* Sylvie Perdriel; [email protected] *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 :* [email protected] [ mailto:[email protected] <[email protected]>] *De la part de* Sylvie Perdriel *Envoyé :* jeudi 20 mars 2014 14:24 *À :* [email protected] *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
_______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
