Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.12.2
-
-
4422a9bd88602c8dfde8648ad39692d968295cfc (qt/qtbase/5.14)
Description
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?
Attachments
Issue Links
- is duplicated by
-
QTBUG-79906 QTableWidget very high CPU usage when both horizontal and vertical scroll bars shown
- Closed
-
QTBUG-80794 Endless Loop with QTreeView and QGraphicsView
- Closed