Package QML Element

Package provides a collection of named items. More...

Attached Properties

Detailed Description

The Package class is used in conjunction with VisualDataModel to enable delegates with a shared context to be provided to multiple views.

Any item within a Package may be assigned a name via the attached property.

The example below creates a Package containing two named items; list and grid. The third element in the package (the Rectangle) is parented to whichever delegate it should appear in. This allows an item to move between views.

These named items are used as the delegates by the two views who reference the special VisualDataModel::parts property to select a model which provides the chosen delegate.

See also Package example, Photo Viewer demo, and QtDeclarative.

Attached Property Documentation : string

This attached property holds the name of an item within a Package.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.