C
SubPresentationSettings QML Type
Settings for sub-presentations. More...
Import Statement: | import QtStudio3D 2.4 |
Properties
- qmlStreams : list<QmlStream>
Detailed Description
This type enables specifying a QML sub-presentation directly in the QML.
A QML sub-presentation is a Qt Quick scene that is rendered to a texture and then used either as the contents of Qt 3D Studio layer or as a texture map. The contents of such a sub-presentation can be provided in two ways: by a separate .qml
file, or directly under the Studio3D element. SubPresentationSettings is the enabler for the latter.
Usage
Studio3D { id: studio3D Presentation { source: "file:///presentation.uia" SubPresentationSettings { qmlStreams: [ QmlStream { presentationId: "sub-presentation-id" Item { width: 1024 height: 1024 // ... other Qt Quick items } } ] } } }
Linking to the Presentation via presentationId
In Qt 3D Studio presentations QML sub-presentations are specified in the assets element of the presentation's .uia
file. This is important also when using SubPresentationSettings and QmlStream.
<assets ...> <presentation-qml id="presentation-id" args="preview-presentation.qml" /> </assets>
Note: the Qt 3D Studio application takes care of generating the .uia
file based on what the designers have set in the Sub-presentations dialog.
The presentation-id
attribute must contain a unique ID for the sub-presentation. The corresponding QmlStream must provide the same value in its presentationId property. The args
attribute may contain an optional preview version of the item, which is only used in the Viewer application.
Property Documentation
Available under certain Qt licenses.
Find out more.