How to draw text derived from QHeaderView class
1 answer
The documentation says:
Underlines the section indicated by the given boolean identifier using the given artist and direct.
This means that you must use the rect parameter as a parameter:
void HeaderView::paintSection(QPainter *painter, const QRect& rect, int) const
{
painter->drawText(rect, Qt::AlignCenter, "abcde");
}
+5
source to share