Pointer Handlers that manipulate target item properties should now use QQuickDragAxis consistently to: - enforce minimum and maximum values - hold the persistent and active values - make those available via properties - emit a new activeValueChanged(delta) signal when the value changes, so that it's possible to incrementally update a target item property in JS (onValueDelta: target.property += delta) In the pinchHandler.qml example, you can use the PinchHandler to adjust 4 properties of one Rectangle independently (it requires coordination). m_boundedActiveValue controls whether m_activeValue will be kept between minimum and maximum. For rotation, tst_QQuickPinchHandler::scaleNativeGesture() expects it to be, although that seems questionable now, and may be addressed later. [ChangeLog][QtQuick][Event Handlers] PinchHandler now has scaleAxis and rotationAxis grouped properties, alongside the existing xAxis and yAxis; and all of these now have activeValue and persistentValue properties. The activeValueChanged signal includes a delta value, giving the incremental change since the previous activeValue. The persistentValue is settable, in case some target item property can be adjusted in multiple ways: the handler's stored value can then be synced up with the item property value after each external change. These features are also added to DragHandler's xAxis and yAxis properties. Task-number: QTBUG-68108 Task-number: QTBUG-76380 Task-number: QTBUG-76379 Task-number: QTBUG-94168 Change-Id: I78a5b43e9ba580448ef05054b6c4bc71b1834dd6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> |
||
---|---|---|
.. | ||
qml | ||
qmltest | ||
quick | ||
quickcontrols | ||
CMakeLists.txt | ||
README | ||
examples.pro |
README
The Qt Quick module provides the basic elements to specify and implement your user interface declaratively, using the Qt Meta-Object Language (QML). The Qt QML module provides the engine and language infrastructure for QML itself. This language is very expressive and human readable, and can be used by designers to actually implement their UI vision. QML UIs can integrate with C++ code in many ways, including being loaded as a part of a C++ UI and loading data models from C++ and interacting with them. Mostof these examples can be viewed directly with the QML viewer utility, without requiring compilation. Documentation for these examples can be found via the Examples link in the main Qt documentation.