GroupItem QML Type

A group item that gets its size from its children. More...

Import Statement: import QtQuick.Studio.Components
Since: QtQuick.Studio.Components 1.0
Inherits:

Item

Detailed Description

The Group type is an Item type extended with the size property. The value of size is automatically calculated to fit the children of the group.

Example Usage

You can use the Group type to specify the size of one or several items.

The QML code looks as follows:

 GroupItem {
    id: group
    x: 820
    y: 437

    Rectangle {
        id: rectangle1
        width: 200
        height: 200
        color: "#c2c2c2"
    }

    Rectangle {
        id: rectangle2
        x: 140
        y: 140
        width: 200
        height: 200
        color: "#000000"
    }
}

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