O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Devices

Qt 3D is focused on providing a good abstraction for every aspect it handles. This applies to input as well. In terms of Qt 3D, an application may have access to an arbitrary number of physical devices. They are represented by the AbstractPhysicalDevice type. At the time of writing, there are two built-in types of physical devices: keyboard and mouse. You can access them by declaring an object of KeyboardDevice or MouseDevice type in your QML file.

You can use properties of the device object to configure its behavior. There is currently only one such property: the MouseDevice type has a sensitivity property that affects how mouse movement is converted to axis inputs.

It's allowed to create multiple objects of the same device type ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required