Qt 3D Studio: QML DataInput Example

This example demonstrates using DataInput elements with QML in Studio


The presentation consists of a static text element serving as a label and a rotating text element for showing the input data as text. There is also a data input of type Ranged Number in the presentation. This data input is used to control both the rotation animation time and the text shown on the second text element. The range is specified as [0 .. 360] in the presentation, where zero maps to the beginning of the animation and 360 maps to the end of the animation.

The qml main loads the presentation and animates a number property. The value of the animated property is bound to the value property of the DataInput element, making the value show up in the linked text element in the presentation. The same value is used to control the animation time:

Presentation {
    source: "qrc:/presentation/datainput.uia"
    DataInput {
        // Name must match the data input name specified in the presentation
        name: "rangeInput"
        value: studio3D.inputNumber


Available under certain Qt licenses.
Find out more.