Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QAbstractItemView::visualRect() vs: rect text is drawn?
davecotter last edited by
the visualRect is the ENTIRE area enclosed by the cell in the table, right?
but the text is clipped a bit inset from that, right?
by clipped i mean the text is shrunk / elided to fit in this slightly smaller than visualRect area, right?
how do i get that smaller area so if i'm drawing custom text or i want to hand some text up to _inherited, i know how big it is allowed to be?
When you draw custom text you have to calc it by your own. It's heavily style dependent and therefore no public api possible. For qcommonstyle look at the sources: https://code.woboq.org/qt5/qtbase/src/widgets/styles/qcommonstyle.cpp.html#_ZNK19QCommonStylePrivate12viewItemSizeEPK20QStyleOptionViewItemi