diff options
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml')
-rw-r--r-- | src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml new file mode 100644 index 0000000000..38c0f03366 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-groupbox-custom.qml @@ -0,0 +1,33 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//! [file] +import QtQuick +import QtQuick.Controls + +GroupBox { + id: control + title: qsTr("GroupBox") + + background: Rectangle { + y: control.topPadding - control.bottomPadding + width: parent.width + height: parent.height - control.topPadding + control.bottomPadding + color: "transparent" + border.color: "#21be2b" + radius: 2 + } + + label: Label { + x: control.leftPadding + width: control.availableWidth + text: control.title + color: "#21be2b" + elide: Text.ElideRight + } + + Label { + text: qsTr("Content goes here!") + } +} +//! [file] |