Thanks, but even without the map, as I wrote, the result is QPoint(0, 0). Are the QAbstractView's scrollbars part of the viewport, or are they outside of them? Basically, for testing purposes I'd like to do:
painter.fillRect(rect(), Qt::yellow);
QPainter painter(this);
painter.fillRect(rect(), Qt::yellow);
To copy to clipboard, switch view to plain text mode
Of course, this doesn't work because of the QAbstractScrollArea. So how could I erase the background of QAbstractViewItem manually?
EDIT:
Would it be possible to filter paint events of the viewport() or the both *ScrollBar()s and do some painting before forwarding the event?
Bookmarks