Hi there,
in a class derived from QTreeView I need to find out he height of the header row in order to correct the coordinates reported in a hover event and find the model index corresponding to the mouse position. It turns out, that the position reported is relative to the top left corner of the widget, but I need the coordinate relative to the top left corner of the inner tree view itself. Thus, I need to find out the height of the header row.
However, calling the parent's class function
QTreeView::headerData(0, Qt
::Horizontal, Qt
::SizeHintRole)
QTreeView::headerData(0, Qt::Horizontal, Qt::SizeHintRole)
To copy to clipboard, switch view to plain text mode
only returns a QSize(-1,-1) which probably corresponds to a QVariant().
So, how can I find out the height of the header row?
Bookmarks