Neptune 3 UI Cursor Management Support
Neptune 3 UI comes with cursor support to enable navigating the UI via other input methods, besides touch, such as a keyboard or gamepad.
Use the Cursor
Neptune 3 UI integrates the experimental Cursor Management plugin from Qt Labs. For more details, see the Cursor Management Plugin source code.
Once the plugin is installed, you can import it in QML as follows:
import CursorNavigation 1.0
Two QML types have been created in Neptune3UI for cursor implementation: CursorManagement and CursorManagementDummy. Each time the UI starts, a Loader loads the correct file,
- CursorManagement -- if the Cursor Management Plugin is available
- CursorManagementDummy -- if the Cursor Management Plugin isn't available
This is done for stability without depending on the plugin's availability on the system. The process above is done inside Cursor.qml
, a file that also contains all necessary bindings and API for the Cursor interface. It's this type that is instantiated in the element in which we want to have cursor support.
T.Button {
id: control
Cursor { }
}
List of Members
Besides the properties, functions and signals that come with the cursor management plugin, Neptune 3 UI adds and additional signal, pressAndHold
, to simulate a long press event.
T.Button { id: control Cursor { onPressAndHold: { control.pressAndHold(); } } }
© 2019 Luxoft Sweden AB.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.