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. Looks like wrong behaviour of QDrag
Forum Updated to NodeBB v4.3 + New Features

Looks like wrong behaviour of QDrag

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

    I have QGraphicsScene that shows QWidget(s) via QGraphicsProxyWidget.
    Widgets can exchange data through D&D. Widget produces QDrag item according to docs.

    When QDrag object leaves area of QGraphicsProxyWidget I expect to receive dragLeaveEvent() for the particular proxy widget. But it happens not always.

    IF the scene ACCEPTS event in the dragMoveEvent() outside the area of proxy then dragLeaveEvent() DO NOT INVOKES in the proxy.

    IF the scene DO NOT ACCEPT event in the dragMoveEvent() outside the area of proxy then dragLeaveEvent() INVOKES.

    Pseudo graphic:

    A B C

    A - the pixel inside proxy
    B - the border of proxy
    C - the scene area

    I drag item from A to C and expect for dragLeaveEvent() in the proxy. But if QDrag is 'accepted' in points A and in the point C then no event. If QDrag is 'accepted' in A and 'rejected' in C dragLeaveEvent() happens in the proxy.

    Is this expected behaviour? As for me dragLeaveEvent() should be invoked in both cases.

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

      Hi and welcome to devnet,

      Sounds like a reasonable expectation. You should look at the bug report system to see if it's something known. If not, please consider opening a bug providing a minimal compilable example showing that behavior.

      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
      0

      • Login

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