aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/GroupBox.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/GroupBox.qml')
-rw-r--r--src/imports/controls/GroupBox.qml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml
index 8504fae9..08866606 100644
--- a/src/imports/controls/GroupBox.qml
+++ b/src/imports/controls/GroupBox.qml
@@ -40,7 +40,9 @@ import Qt.labs.templates 1.0 as T
T.GroupBox {
id: control
- implicitWidth: Math.max(background ? background.implicitWidth : 0, contentWidth + leftPadding + rightPadding)
+ implicitWidth: Math.max(background ? background.implicitWidth : 0,
+ label ? label.implicitWidth + leftPadding + rightPadding : 0,
+ contentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0, contentHeight + topPadding + bottomPadding)
contentWidth: contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0
@@ -48,7 +50,7 @@ T.GroupBox {
spacing: 6
padding: 6
- topPadding: 6 + (label && title ? label.implicitHeight + spacing : 0)
+ topPadding: 6 + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
//! [contentItem]
contentItem: Item { }