Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Drag inside scaled item.

    QML and Qt Quick
    1
    1
    453
    Loading More Posts
    • 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.
    • D
      DDDIM last edited by

      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.

      ksm-intech.ru

      1 Reply Last reply Reply Quote 0
      • First post
        Last post