"Dead zone" around MouseArea when dragging?



  • 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"
        }
    }
    

    }@


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.