I want to implement automatic vertical scrolling in QTreeView when rows are dragged. I set autoScroll and acceptDrops to true, but it doesn't work. How can this be achieved?
I want to implement automatic vertical scrolling in QTreeView when rows are dragged. I set autoScroll and acceptDrops to true, but it doesn't work. How can this be achieved?
I found a way to scroll tree view with scrollTo method, only it doesn't seem to be convenient for a user when hint is something other than EnsureVisible, from the other side I can't scroll to the row that is currently invisible when hint = EnsureVisible. Please, suggest me how can I overcome this.
Also I still don't understand the purpose of autoScroll property. Why do we need it if I have to do all the work manually with scrollTo?
Ok, problem solved. I had to call base class method in overriden dragMoveEvent (wanted to mention this for those who may face it too).
Fred (26th February 2021)
Bookmarks