Drag inside scaled item.



  • Hello everyone! I have a paroblem with dragging item inside scaled item.

    Simplest way to explain is a little qml test program:

    @
    import QtQuick 2.1
    import QtQuick.Controls 1.0

    ApplicationWindow {
    title: qsTr("Hello World")
    width: 640
    height: 480

    Rectangle{transformOrigin: Item.TopLeft;
    height: 10; width: 10; color: "black"; scale: 50;
    Rectangle{ height: 1;width: 1;  color: "green"
    
        MouseArea{id: dragArea
            anchors.fill:parent;
            drag.target: parent;
        }
    }
    }
    

    }
    @

    When I trying to drag, it is starting when i move mouse scale10 = 5010 = 500 pixels. I want it to start when I move mouse 10 pixels or less. I have a big program, based on scaling father item and I need to accoplish this without changing program logic from scaling to changing widht and height.


Log in to reply
 

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