Add centroid feedback to the WheelHandler autotest
wheelHandler.point.position is the centroid around which the item is rotated or scaled. Change-Id: I4993f8c6c9768dd18d1712b00354ea681bbad369 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
655b637147
commit
1c2af0f39f
|
@ -14,7 +14,23 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "red"
|
||||
width: 6; height: 6; radius: 3
|
||||
x: wheelHandler.point.position.x - radius
|
||||
y: wheelHandler.point.position.y - radius
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
anchors.verticalCenterOffset: 20
|
||||
color: "white"
|
||||
font.pixelSize: 18
|
||||
text: parent.x.toFixed(2) + ", " + parent.y.toFixed(2)
|
||||
}
|
||||
|
||||
WheelHandler {
|
||||
id: wheelHandler
|
||||
activeTimeout: 0.5
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue