Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.0
-
None
-
4d943846128118e1b9932a17ce6f977a0f4127a5 (qt/qtbase/dev)
Description
Consider the attached screenshots of a QTableModel with a vertical header fixed to a custom width and containing long labels which have to be elided. With the default font, elision works as expected but when increasing the font size or changing the font, elision works in unexpected manners. It looks like the text bounding rectangle calculated to derive the text elision uses the default font and not the font set by the style! For example when using elide mode "middle", then the ellipses are definitely not in the middle but almost on the right edge and the letters thereafter look cut off like they actually go outside the header.
Also attached is a minimal example to create the screenshots.
Attachments
For Gerrit Dashboard: QTBUG-86426 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
325695,5 | QHeaderView: respect the font role while calculating the elided text | dev | qt/qtbase | Status: MERGED | +2 | 0 |
326119,8 | QHeaderView: respect the font role while calculating the elided text | dev | qt/qtbase | Status: MERGED | +2 | 0 |
326703,1 | QHeaderView: respect the font role while calculating the elided text | 5.15 | qt/qtbase | Status: ABANDONED | -1 | 0 |