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. drag && dropArea BUG
Forum Updated to NodeBB v4.3 + New Features

drag && dropArea BUG

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 236 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.
  • C Offline
    C Offline
    Cheng shi hua
    wrote on last edited by Cheng shi hua
    #1

    //drag file
    Drag.keys: [ "InterfaceLink" ]
    Drag.active: mouseArea.drag.active
    Drag.hotSpot.x: width/2
    Drag.hotSpot.y: height/2
    Drag.source: root

    //drop file
    import QtQuick 2.12

    DropArea {
    id: root

    onEntered: {
        console.log("input enter",drag.source.objectName)
    }
    
    onContainsDragChanged: {
        console.log("containsDrag ",containsDrag)
    }
    
    onExited: {
        console.log("input exit",drag.source.objectName)
    }
    
    onDropped: {
        console.log("input drop",drop.source.objectName)
    }
    

    }

    when drag enter droparea, then emit onEnter is ok!, after release mouse, then the dropArea print exit && containsDrag==false, why????????????

    1 Reply Last reply
    0
    • D Offline
      D Offline
      damianatorrpm
      wrote on last edited by damianatorrpm
      #2

      try Qt 5.13 / 5.14 dropArea works fine for me.
      Your complaint is that it does not say input drop?
      Maybe drag.source.objectName is not valid? try removing that
      Because on mouse release contains drag will be false as the drag stopped (dropped)

      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