A dice throwing application that demonstrates using Qt Quick 3D Physics and Qt Quick 3D.
This example application allows you to roll some dice on a table. It's implemented with QML and relies on a number of Qt modules that are detailed in the following sections.
This particular example is also available in the google play store as Qt Dice.
As with any Qt example you can of course still build the application yourself for your target of choice.
Dice demonstrates using Qt Quick 3D Physics for the physical simulation of dice and a wooden table. The rendering is done with components from Qt Quick 3D. For information on how this can be achieved, see the Qt Quick 3D Physics - Custom Shapes Example.
On compatible targets, using Qt Sensors API enables using accelerometer output to detect when the device is shaken, triggering a dice roll. For more information on using an accelerometer, see the Sensors Showcase example.
A Qt Quick UI is provided for configuring the physical material of the simulated dice, the magnitude of gravity, and the number of dice.
Note: The example makes use of the Qt Quick 3D module, which is a separate item in the Qt Online Installer. If the example fails to configure, please make sure that you have Qt Quick 3D package installed.
© 2023 The Qt Company Ltd. 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.