Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. DropArea signals seem wonky. Entered, exited, dropped aren't when I expect.
Forum Update on Monday, May 27th 2025

DropArea signals seem wonky. Entered, exited, dropped aren't when I expect.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 367 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.
  • YosemiteY Offline
    YosemiteY Offline
    Yosemite
    wrote on last edited by Yosemite
    #1

    The Entered, exited, and dropped signals aren't being emitted when I would expect them to be. I've created a DropZone thusly:

    import QtQuick 2.7
    
    DropArea {
        id: dropArea
    
        height: 120; width: 120
    
        onEntered: console.log("enter")
        onExited: console.log("exit")
        onDropped: console.log("drop")
    
        Rectangle {
            id: rect
            anchors.fill: parent
            color: "grey"
            border.color: "black"
            border.width: 4
    
        }
    
    }
    

    When I drag an item over this I get no signal. When I drop it the first time I get no signal. However - if I move it around within the DropZone (without dragging it out) i will get both signals.

    Subsequently, when I drag the item out and drop it somewhere else the DropZone emits entered and Dropped again one last time. I never get Exited.

    Is this the expected behavior?

    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