QtObject QML Element

The QtObject element is the most basic element in QML. More...

Since: Qt 4.7
Instantiates: QObject

Detailed Description

The QtObject element is a non-visual element which contains only the objectName property.

It can be useful to create a QtObject if you need an extremely lightweight element to enclose a set of custom properties:

import QtQuick 1.0

Item {
    QtObject {
        id: attributes
        property string name
        property int size
        property variant attributes
    }

    Text { text: attributes.name }
}

It can also be useful for C++ integration, as it is just a plain QObject. See the QObject documentation for further details.

© 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.