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. Drag inside scaled item.
QtWS25 Last Chance

Drag inside scaled item.

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 537 Views
  • 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 Offline
    D Offline
    DDDIM
    wrote on last edited by
    #1

    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
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved