Priority: P2: Important
Affects Version/s: 5.12.2
In our applications we add shadows to buttons using QWidget::render() method.
After upgrade from Qt 5.9 to 5.12 we found, that frames/layouts that contain such shadowed buttons are slow to be shown or re-painted if such frames/layouts are placed together in some kind of UI hierarchy (e.g. stack) with (even empty) item views (e.g. QTableView/QTreeView) that have QHeaderView (even invisible).
After time profiling of QWidget::render() code we found that root of slowness is calling 'sendPendingMoveAndResizeEvents' for application top level window (and as result for all its children, even invisible) in QWidgetPrivate::prepareToRender.
This code is quite debatable as we don't see the reason to push resize events to invisible widgets and looks like main root of the problem. Could you explain why it is so?
But this code was the same even in Qt 5.9.
The actual root of explained regress is the fix for
QTBUG-67532/ QTBUG-34095, that introduces emitting 'geometryChanged' on reacting on QEvent::Resize in QHeaderView::viewportEvent. Earlier this event type was ignored in this place.
Please find attached sample project demonstrating problem.
Do you think QWidget::render function could be reviewed in part of sending resize events to invisible top level application window children?
|For Gerrit Dashboard: QTBUG-75475|
|264582,4||QWidget: don't set WA_PendingMoveEvent when geometry does not change||5.14||qt/qtbase||Status: MERGED||+2||0|
|284738,1||QWidget: don't set WA_PendingMoveEvent when geometry does not change||5.12||qt/qtbase||Status: ABANDONED||-1||0|