Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.7.0
-
None
-
Linux
Description
When adding a newly created qgwidget* foo to a qglayout* bar via addItem, the layout bar schedules an activation by calling invalidate()
However it may happen that foo->paint() is called by the scene while bar->isActivated() is still false, hence the item will be painted
with the default sizes at the default position (0,0).
After this, the layout bar gets activated and subsequently the widget foo is painted with the correct geometry.
Calling bar->activate() after insertion solves the issue.
It looks like a timing issue... adding too many qDebugs results in a drop in reproducibility.
This is confirmed by some qDebug investigation on a easily reproducible usecase (unfortunately involving plasma device notifier from KDE)
I am now trying to set up a pure qt usecase, although it doesn't seem to be trivial