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. Generic QTreeView with Drag & Drop

Generic QTreeView with Drag & Drop

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 905 Views 1 Watching
  • 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.
  • P Offline
    P Offline
    pvt.peter
    wrote on last edited by
    #1

    Hi Everybody,

    I am looking for a generic solution to QTreeView with Drag & Drop. Important features are:

    • list item inner Drag & Drop (not from another widget or an external application)
    • if the item A is dropped on the item B, A is moved as a child of B
    • the TreeView shows items A, B and C: if I drag A item between B and C, the order becomes B, A and C

    Is there any solution which satisfies the above requirements?

    BR,
    Peter

    1 Reply Last reply
    0
    • SGaistS SGaist

      Hi,

      You can find the basics in the Model View Programming chapter of Qt's documentation.

      P Offline
      P Offline
      pvt.peter
      wrote on last edited by
      #3

      @SGaist thanks for your reply.

      I found a working solution here: Full drag and drop support in QTreeView.

      1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Hi,

        You can find the basics in the Model View Programming chapter of Qt's documentation.

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

        P 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          You can find the basics in the Model View Programming chapter of Qt's documentation.

          P Offline
          P Offline
          pvt.peter
          wrote on last edited by
          #3

          @SGaist thanks for your reply.

          I found a working solution here: Full drag and drop support in QTreeView.

          1 Reply Last reply
          1

          • Login

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