View Single Post
Markkyboy's Avatar
Posts: 433 | Thanked: 727 times | Joined on Oct 2012 @ Costa Blanca, Espaņa
#3
One problem sorted!, here's how.....

Draggable rectangle can be anchored and still be dragged when 'onPressed';

Example:

Code:
Rectangle {
    id: rect
    anchors {
        top: parent.top
        topMargin: Theme.paddingMedium
        horizontalCenter: parent.horizontalCenter
        //......other code
    }

MouseArea {
    //....other code
    onPressed: {
        rect.anchors.top = undefined
        rect.anchors.topMargin = undefined
        rect.anchors.horizontalCenter = undefined
    }
}
Now to solve the problem of the rectangle appearing correctly in landscape!
__________________
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..
 

The Following User Says Thank You to Markkyboy For This Useful Post: