PDA

View Full Version : QTreeView autoscrolling in drag move events



mentalmushroom
21st September 2011, 13:26
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?

mentalmushroom
22nd September 2011, 10:49
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?

mentalmushroom
23rd September 2011, 13:56
Ok, problem solved. I had to call base class method in overriden dragMoveEvent (wanted to mention this for those who may face it too).