I need to draw text in derived from QHeaderView class. But this code does not work.
void HeaderView::paintSection(QPainter *painter, const QRect &, int) const
{
painter->drawText(0, 0, "abcde");
}
I need to draw text in derived from QHeaderView class. But this code does not work.
void HeaderView::paintSection(QPainter *painter, const QRect &, int) const
{
painter->drawText(0, 0, "abcde");
}
The documentation says:
That means, you have to use the rect getting as parameter: