Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.1, 5.10.0 Alpha
-
None
Description
When QHeaderView paints the section, when eliding text, it doesn't account for the extra width taken by the DecorationRole icon.
The fix would be to first get the icon, if any, and add the icon's pixmap's width to the text margin, i.e.
if (!opt.icon.isNull()) margin += get_pixmap_width(opt.icon) if (d->textElideMode != Qt::ElideNone) ...
I don't know how to get actual pixmap width from QIcon as it probably depends on the dimensions of the underlying header item
Probably related issue: https://bugreports.qt.io/browse/QTBUG-30116
Attachments
Issue Links
- relates to
-
QTBUG-30116 resizeToContents sometimes slightly to small
- Closed