C
Qt Quick Ultralite layouts Example
/****************************************************************************** ** ** Copyright (C) 2024 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Quick Ultralite module. ** ** $QT_BEGIN_LICENSE:COMM$ ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see http://www.qt.io/terms-conditions. For further ** information use the contact form at http://www.qt.io/contact-us. ** ** $QT_END_LICENSE$ ** ******************************************************************************/import QtQuick import QtQuick.Controls Rectangle { id: root required property string propertyName required property string propertyValue property bool checked: checkbox.checked width: container1.width height: container1.height + container2.height Column { Rectangle { id: container1 width: 120 height: 30 color: "#003f48" Text { text: propertyName font.pointSize: 10 color: "#21db81" anchors.verticalCenter: parent.verticalCenter x: 8 } CheckBox { id: checkbox anchors.right: parent.right anchors.rightMargin: 8 anchors.verticalCenter: parent.verticalCenter height: 28 width: 28 } } Rectangle { id: container2 color: "#d4d4d4" width: 120 height: 30 Text { text: propertyValue font.pointSize: 10 color: "#003f47" anchors.verticalCenter: parent.verticalCenter x: 8 } } } }