Drag and Drop to a QTreeWidget subclass

  • Hi,

    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.


  • Lifetime Qt Champion


    You should share the code of your MyWidgetTree class. That way it will make things easier to analyse.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.