|
Qt::TouchPointState is not the actual type here, and we should not
encourage e.g. making a comparison between eventPoint.state and
Qt.TouchPointMoved in an onGrabChanged handler. The equivalence is
an internal detail; and eventPoint can come from any pointing device,
not only from a touchscreen.
QEventPoint is a Q_GADGET; we keep the registration to expose it as a
value type (eventPoint). But such types cannot be created in QML, and we
also need to give it an uppercase name to scope the enum values that it
declares: that's a new foreign namespace called EventPoint. So it's
possible to compare an eventPoint instance's state property against
EventPoint.Pressed, and so on.
Also show complete QML syntax in the \value tables where
PointerDevice::GrabTransition is emitted to QML, namely
PointerDevice::grabChanged and PointerHandler::grabChanged.
Amends b43a873264d012dc0a0e574ea53335a40af8aa38
Task-number: QTBUG-102160
Change-Id: If1a97f21d8e005e3692298b8512f7f8b56a92c97
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|