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. QTreeview Drag and Drop restrict to depth level[movement between siblings]
Forum Updated to NodeBB v4.3 + New Features

QTreeview Drag and Drop restrict to depth level[movement between siblings]

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 190 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.
  • replR Offline
    replR Offline
    repl
    wrote on last edited by repl
    #1

    745ddabe-8f39-43df-aec4-87fd7a3adaec-image.png

    In the above image which depicts my treeview, when SUbfolder1A Dragged I should only allow it to be under Folder1, should not allow gaining a new parent. SO the main rule is Upon Drag and Drop i should always make sure that the direct parent never changes. Any Suggessions please...

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

      Hi,

      You need to write your own dropEvent and handle there your specific conditions.

      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

      • Login

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