Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Drag inside scaled item.

$
0
0
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 scale*10 = 50*10 = 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.

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images