aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_groupbox.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 13:05:48 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 12:13:31 +0000
commit06d4931ede0a1b4422a52014b3bed7a4036d6bcc (patch)
tree05ea5d744898928460f6781754de8f0b5c07ce63 /tests/auto/controls/data/tst_groupbox.qml
parentd665c0faf4ac52a8aeed48ee8497b5d61becedc5 (diff)
Containers: use the implicit size of the contentItem
The result of: Frame { ColumnLayout { RadioButton { text: "First" } RadioButton { text: "Second" } RadioButton { text: "Third" } } } is now identical to: Frame { contentItem: ColumnLayout { RadioButton { text: "First" } RadioButton { text: "Second" } RadioButton { text: "Third" } } } Change-Id: I823b2259dabb66db0dddef41ea396f7ac1000a82 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests/auto/controls/data/tst_groupbox.qml')
-rw-r--r--tests/auto/controls/data/tst_groupbox.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_groupbox.qml b/tests/auto/controls/data/tst_groupbox.qml
index 55568923..0f0e33fb 100644
--- a/tests/auto/controls/data/tst_groupbox.qml
+++ b/tests/auto/controls/data/tst_groupbox.qml
@@ -79,6 +79,16 @@ TestCase {
}
}
+ Component {
+ id: contentBox
+ GroupBox {
+ contentItem: Item {
+ implicitWidth: 100
+ implicitHeight: 30
+ }
+ }
+ }
+
function test_empty() {
var control = groupBox.createObject(testCase)
verify(control)
@@ -113,4 +123,16 @@ TestCase {
control.destroy()
}
+
+ function test_contentItem() {
+ var control = contentBox.createObject(testCase)
+ verify(control)
+
+ compare(control.contentWidth, 100)
+ compare(control.contentHeight, 30)
+ verify(control.implicitWidth > 100)
+ verify(control.implicitHeight > 30)
+
+ control.destroy()
+ }
}