Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Drag and Drop to a QTreeWidget subclass
QtWS25 Last Chance

Drag and Drop to a QTreeWidget subclass

Scheduled Pinned Locked Moved Unsolved General and Desktop
drag and dropqtreewidget
2 Posts 2 Posters 860 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jcga
    wrote on 23 Jun 2017, 19:10 last edited by
    #1

    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.

    JClaude

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Jun 2017, 22:49 last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      1/2

      23 Jun 2017, 19:10

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved