Bug report #15495
qt5: QGIS freezes upon project loading, renders all composer map item caches
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||23419|
When QGIS is compiled against Qt5, there's an issue whereas the interface freezes upon project load due to QGIS rendering all composer(s)' map item(s)' cache. This makes big projects over here freeze QGIS for 10sec.
I somehow remembers a similar freeze way back a few years ago which was fixed. Seems whatever got fixed then doesn't work for Qt5.
It'd be good to address the cause of this, nowadays it's pretty much the only UI regression under Qt5 :) (wouhou!)
Remove composer window visibiliy state restoration upon project load
#4 Updated by Mathieu Pellerin - nIRV about 4 years ago
After spending the morning debugging this issue, I've spotted the issue: under Qt5, closing a QMainWindow will reset its WindowState to Qt::WindowNoState value (whereas Qt4 would not do that). This would accidentally trigger another part of the code that renders a given composer's map item cache when it detects a window state change from minimized to non-minimized (which, under Qt4 would occur only when a user opens the window).
I've discussed this with Nyall over the morning. The solution we agreed upon is to disable the composer window visibility (i.e. the show() / close() calls when loading the composer from a project file) to be able to keep deferring map item cache rendering while preventing a Qt5 freeze.