The thing is that in a QTreeWidget the default drag and drop action is Copy, to make a Move action you have to hold SHIFT. I was wondering if I could change it so I don't have to hold shift in order to make a Move action. I restricted actions to MoveAction using the "supportedActions()" function and "setSupportedActions()". Now, it works if I shift-drag but if I just drag normally it doesn't work (since it's trying to make a Copy action which is not supported)
I have another newbie question. I have a class (MyMainWindow) which reimplements QMainWindow and in that class, I created the MyTreeWidget class (which inherits QTreeWidget). I understand that in MyTreeWidget I can use the "parentWidget()" function which returns a QWidget pointer on my parent (MyMainWindow), but how can I have access to the private variables I have in MyMainWindow, since the pointer is of QWidget type?
Thanks.




Reply With Quote
Bookmarks