QTreeView or QHeaderView resize cursor
General and Desktop
6
Posts
4
Posters
3.4k
Views
1
Watching
-
I have a class that inherits from QTreeView, I would like the mouse cursor to change to the Qt::SizeHorCursor cursor when the mouse is over the column boundary of the QHeaderView columns. This doesn't seem to be built into QHeaderView or QTreeView automatically. I have enabled mouse tracking of both the QTreeView and the QHeaderView but I do not get the mouseMove events unless the left mouse button is pressed which doesn't help me to implement my own routine to change the cursor.
Has anyone already solved this that can share code samples?
Thanks
ddolby -
What Qt version do you use?
Do you set resize mode of header view (http://qt-project.org/doc/qt-4.8/qheaderview.html#ResizeMode-enum) to interactive?