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?
Forum Updated to NodeBB v4.3 + New Features

QTreeView track ended dragEvent outside application window?

Scheduled Pinned Locked Moved Solved General and Desktop
qtreeviewdrag and dropmouse eventc++qt
3 Posts 2 Posters 371 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.
  • S Offline
    S Offline
    StudentScripter
    wrote on 23 Nov 2023, 15:33 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. :)

    P 1 Reply Last reply 23 Nov 2023, 19:08
    0
    • S StudentScripter
      23 Nov 2023, 15:33

      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. :)

      P Online
      P Online
      Pl45m4
      wrote on 23 Nov 2023, 19:08 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 26 Nov 2023, 11:42
      0
      • P Pl45m4
        23 Nov 2023, 19:08

        @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 26 Nov 2023, 11:42 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 26 Nov 2023, 11:42

        1/3

        23 Nov 2023, 15:33

        • Login

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