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 track ended dragEvent outside application window?

QTreeView track ended dragEvent outside application window?

Scheduled Pinned Locked Moved Solved General and Desktop
qtreeviewdrag and dropmouse eventc++qt
3 Posts 2 Posters 368 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.
  • S Offline
    S Offline
    StudentScripter
    wrote on last edited by
    #1

    Hello so I have a QTreeView and when i perform a dragevent and drag outside the application window i still see the dragged item till mouse release, but certainly how can i get the information when this drag was aborted/the mouse was released???

    I need this information to repaint the QTreeView on mouse release/drag abort.

    Thanks for the help. :)

    Pl45m4P 1 Reply Last reply
    0
    • S StudentScripter

      Hello so I have a QTreeView and when i perform a dragevent and drag outside the application window i still see the dragged item till mouse release, but certainly how can i get the information when this drag was aborted/the mouse was released???

      I need this information to repaint the QTreeView on mouse release/drag abort.

      Thanks for the help. :)

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @StudentScripter

      In this case you can try

      • https://doc.qt.io/qt-6/qdragleaveevent.html#details

      This event occures when you drag and move over your area but dont drop it there and leave your widget instead (because the drag'n'drop belongs to some other window / app)


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      S 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @StudentScripter

        In this case you can try

        • https://doc.qt.io/qt-6/qdragleaveevent.html#details

        This event occures when you drag and move over your area but dont drop it there and leave your widget instead (because the drag'n'drop belongs to some other window / app)

        S Offline
        S Offline
        StudentScripter
        wrote on last edited by
        #3

        @Pl45m4 Worked like a charm, thank you very much. :)

        1 Reply Last reply
        0
        • S StudentScripter has marked this topic as solved on

        • Login

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