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. "Dead zone" around MouseArea when dragging?

"Dead zone" around MouseArea when dragging?

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

    Hi Guys,

    I'm trying to drag a Rectangle but I notice that when I press down and start moving the cursor the rectangle doesn't start dragging until my mouse is outside the MouseArea. Is there a way of controlling this? Ideally I would like to start dragging as soon as the mouse moves, not until it leaves the mouse area.

    Here is my code:
    @import QtQuick 2.0

    Item
    {
    id: key
    width: key_rect.width
    height: key_rect.height

    MouseArea
    {
        id: drag_area
        width: 50
        height: 14
        drag.target : key
        drag.axis : Drag.XAxis
    
        Rectangle
        {
            id:key_rect
            width: 14
            height: 14
            color: "#FFFFFF"
        }
    }
    

    }@

    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