Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Drag and Drop to a QTreeWidget subclass
jcga last edited by
I have an application with a QMainWindow that has a subclass of QTreeWidget, say MyTreeWidget, as central widget. I can drag and drop normaly to the MainWindow widget, but not to MyTreeWidget. In fact the override MyTreeWidget::dragEnterEvent() is called, but MyTreeWidget::dropEvent() never is. I verifyed that setAcceptDrops(true) is called in the constructor of MyTreeWidget(), and I verified that inside MyTreeWidget::dragEnterEvent(), acceptDrops() returns 'true'.
Any suggestion is appreciated.
You should share the code of your MyWidgetTree class. That way it will make things easier to analyse.