Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.5.0
-
None
-
162071d2651645358a0935b27af8a3b47474a10f
Description
If a graphics item is hidden when added to scene it never gets a polish event.
void QGraphicsScene::addItem(QGraphicsItem *item)
{
...
if (!item->d_ptr->explicitlyHidden)
...
}
Hidden items never get added to "unpolishedItems" list and thus never get the polish event.
QGraphicsWidget::polishEvent documentation says:
"This event is delivered to the item by the scene at some point after it has been constructed, but before it is shown or otherwise accessed through the scene. You can use this event handler to do last-minute initializations of the widget which require the item to be fully constructed."
But when I call "show" to a widget that was initially hidden I never gets the polish event.