C

Studio3D QML Type

Qt 3D Studio presentation viewer. More...

Import Statement: import QtStudio3D.OpenGL 2.7
Inherits:

Item

Properties

Signals

Detailed Description

This type enables developers to embed Qt 3D Studio presentations in Qt Quick.

Example Usage

Studio3D {
    id: studio3D
    anchors.fill: parent

    Presentation {
        source: "qrc:///presentation.uia"
        SceneElement {
            id: scene
            elementPath: "Scene"
            currentSlideIndex: 2
        }
        Element {
            id: textLabel
            elementPath: "Scene.Layer.myLabel"
        }
    }
    ViewerSettings {
        showRenderStats: true
    }
    onRunningChanged: {
        console.log("Presentation ready!");
    }
}

Controlling the presentation

Like the example above suggests, Studio3D and the other types under the QtStudio3D import offer more than simply rendering the animated Qt 3D Studio presentation. They also offer scene manipulation, including

  • querying and changing scene object properties (for example, the transform of a model, colors and other settings of a material, etc.) via Presentation::getAttribute(), Presentation::setAttribute(), Element, and DataInput,
  • changing slides (and thus starting the relevant animations and applying the scene object property changes associated with the new slide) via Presentation::goToSlide(), SceneElement, and DataInput,
  • and controlling the timeline (the current playback position for the key-frame based animations) both on the main scene and on individual Component nodes via Presentation::goToTime(), SceneElement, and DataInput.

See also Presentation.

Property Documentation

asyncInit : bool

If set to true, indicates that renderer initialization should be done asynchronously in a helper thread. This improves UI responsiveness while initialization is happening, but can lead to slower initialization. Asynchronous initialization may not work properly on all platforms.

Defaults to false.

Changing this property after renderer is created doesn't do anything.

This property was introduced in QtStudio3D.OpenGL 2.5.


error : string

Contains the text for the error message that was generated during the loading of the presentation. When no error occurred or there is no presentation loaded, the value is an empty string.

This property is read-only.


ignoredEvents : EventIgnoreFlags

This property can be used to ignore mouse/wheel/keyboard events. By default all events are enabled.


presentation : Presentation

Accessor for the presentation. Applications are expected to create a single Presentation child object for Studio3D. If this is omitted, a presentation is created automatically.

This property is read-only.


running : bool

The value of this property is true when the presentation has been loaded and is ready to be shown.

This property is read-only.


viewerSettings : ViewerSettings

Accessor for the viewerSettings. Applications are expected to create a single ViewerSettings child object for Studio3D. If this is omitted, ViewerSettings is created automatically.

This property is read-only.


Signal Documentation

frameUpdate()

This signal is emitted each time a frame has been rendered.


presentationLoaded()

This signal is emitted when the presentation has been loaded and is ready to be shown.


presentationReady()

This signal is emitted when the presentation has fully initialized its 3D scene for the first frame.

The difference to presentationLoaded() is that this signal is emitted only when the asynchronous operations needed to build to 3D scene and the first frame have completed.

When implementing splash screens via Loader items and the Item::visible property, this is the signal that should be used to trigger hiding the splash screen.


Available under certain Qt licenses.
Find out more.