Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
5.12.6
-
-
4422a9bd88602c8dfde8648ad39692d968295cfc
Description
When I embed a QTreeView in a QGraphicsView and call .setHeaderHidden(true) on the tree view then when the graphics view is shown, the CPU usage indefinitely spikes to 100% and Qt appears to be in an endless loop of painting.
Steps to reproduce:
===============
I used PySide2 in Python to reproduce the bug but I believe the same can be done in C++.
1) Download the attached test_tree_view.py.
2) Run "python test_tree_view.py" in a terminal to execute the script.
3) Hover the mouse over the opened PySide2/Qt window.
4) Python will now use 100% CPU for an indefinite period of time.
Other Notes:
==========
- Commenting out the `.setHeaderHidden(True)` line in the script avoids the bug.
- From my initial debugging it appeared to be an endless loop where QGraphicsView would paint, which caused the QTreeView to re-layout, which triggered the QGraphicsView to paint again, which caused the QTreeView to re-layout again, etc.
- The bug only occurs if QTreeView is embedded in a QGraphicsView.
Attachments
Issue Links
- duplicates
-
QTBUG-75475 QWidget::render() works very slow if placed in stacked layout with item views that have QHeaderView (e.g. QTableView or QTreeView)
-
- Closed
-
-
QTBUG-79906 QTableWidget very high CPU usage when both horizontal and vertical scroll bars shown
-
- Closed
-
For Gerrit Dashboard: QTBUG-80794 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
284738,1 | QWidget: don't set WA_PendingMoveEvent when geometry does not change | 5.12 | qt/qtbase | Status: ABANDONED | -1 | 0 |