O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Having the composition reference a list of entities

Let's first create the Composition.qml document and add a child entity called elements to it, which will group all elements that we want to add to the composition. We will also add a selectedElement string property, which will hold the objectName of the currently selected element:

// Composition.qmlimport Qt3D.Core 2.0Entity {    id: composition    property alias elements: elements    property string selectedElement    Entity {        id: elements    }}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required