[Qgis-developer] Initial rendering problem with qgis standalone application on Windows and Linux

Nathan Woodrow madmanwoo at gmail.com
Mon Mar 17 15:45:35 PDT 2014

Hey Matthais,

Yes it seems to be a bug caused from another bug fix in 2.2.  There is now
a timer on canvas resize in order to stop it rendering all the time when
changing the size of widget, however the resize event is also fired when
the widget is first shown so it starts the timer and then never repaints
the widget hence why you don't see anything.

I ran into this in a recent standalone app of mine and it drove me crazy
for about a week.  There is a fix so not to worry.  Just do:


once somewhere after the canvas is created.  You only have to do this once.

refresh() stops the timer, repaint() tells Qt to rerender the widget, which
the canvas doesn't do if the timer is running.

P.S this is also not a issue in the latest dev version due to the

- Nathan

On Tue, Mar 18, 2014 at 2:33 AM, Matthias Ludwig <kaotika at gmx.de> wrote:

> Hi, I'am writing on a standalone application and discovered some strange
> behaviour with initial map rendering. I set up a github repo so you can
> test it. (https://github.com/datalyze-solutions/qgis_standalone_test)
> The problem:
> - start the plugin from terminal: python interactive_qgis.py
> - the map will only be visible if you click the terminal and then the app
> window
> The problem occurs on Windows and on Linux. I'm certain that it worked
> like expected with qgis 2.0 (but not 100% sure), maybe its a bug in qgis
> 2.2?
> Greetings
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140318/d4b32cfe/attachment.html>

More information about the Qgis-developer mailing list