Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.5.0
-
None
-
451fcee8a8ec8ae6204e5bd0b26fff5c1292c677
Description
Here is an issue reported on stackoverflow + a workaround I proposed to fix the issue (manually call updateGeometries()).
http://stackoverflow.com/questions/33694064/qtablewidgets-cell-widget-not-displaying-correctly-when-last-row-deleted
Personnaly, I experience the same issue in a QTreeWidget. I have a column with some buttons displayed (through QTreeWidget::setItemWidget). When one line height changes (because the content changed from 1 to 2 lines for instance), then the buttons height is not extended and the GUI looks messy (height of columns with no custom widgets is updated correctly). I also fixed that by calling updateGeometries().
Probably updateGeometries() should be called by base classes (QTreeView and QTableView) when a column goes away or a line's height changes and if custom widgets are displayed....or probably custom widgets geometry should be directly updated (could be more efficient).
Attachments
Issue Links
- duplicates
-
QTBUG-48244 Misaligned geometry can occur for widgets in a QTableWidget after a new row is inserted
- Closed