Element QML Type
Control type for elements in a Qt 3D Studio presentation. More...
|Import Statement:||import QtStudio3D.OpenGL 2.8|
- elementPath : string
This type is a convenience for controlling the properties of a scene object (such as, model, material, camera, layer) in a Qt 3D Studio presentation.
Note: The functionality of Element is equivalent to Presentation::setAttribute() and Presentation::fireEvent().
elementPath : string
Holds the element path of the presentation element.
An element path refers to an object in the scene by name, for example,
Scene.Layer.Camera. Here the right camera object gets chosen even if the scene contains other layers with the default camera names (for instance
To reference an object stored in a property of another object, the dot syntax can be used. The most typical example of this is changing the source of a texture map by changing the
sourcepath property on the object selected by
To access an object in a sub-presentation, prepend the name of the sub-presentation followed by a colon, for example,
void fireEvent(string eventName)
Dispatches an event with eventName on the scene object specified by elementPath.
Appropriate actions created in Qt 3D Studio or callbacks registered using the registerForEvent() method in attached
behavior scripts will be executed in response to the event.
Sets the value of an attribute (property) of the scene object specified by this Element instance. The attributeName is the scripting name of the attribute.
Available under certain Qt licenses.
Find out more.