Move test widget into a tab widget
authorKevin Krammer <kevin.krammer@kdab.com>
Wed, 17 Oct 2012 17:29:38 +0000 (19:29 +0200)
committerKevin Krammer <kevin.krammer@kdab.com>
Wed, 17 Oct 2012 18:12:31 +0000 (20:12 +0200)
layouts.qml

index 6fce9c9..9f40194 100644 (file)
@@ -1,61 +1,65 @@
 import QtGui 1.0
 
-Widget {
-  VBoxLayout {
-    Widget {
-      HBoxLayout {
-        PushButton {
-          HBoxLayout.stretch: 1
-          text: "1"
-        }
-        PushButton {
-          HBoxLayout.stretch: 1
-          text: "1"
-        }
-        PushButton {
-          HBoxLayout.stretch: 2
-          text: "2"
+TabWidget {
+  Widget {
+    TabWidget.label: "Box Layouts"
+
+    VBoxLayout {
+      Widget {
+        HBoxLayout {
+          PushButton {
+            HBoxLayout.stretch: 1
+            text: "1"
+          }
+          PushButton {
+            HBoxLayout.stretch: 1
+            text: "1"
+          }
+          PushButton {
+            HBoxLayout.stretch: 2
+            text: "2"
+          }
         }
       }
-    }
-    Widget {
-      HBoxLayout {
-        Label {
-          HBoxLayout.alignment: Qt.AlignRight
-          text: "Top"
-        }
-        Label {
-          HBoxLayout.alignment: Qt.AlignVCenter
-          text: "VCenter"
-        }
-        Label {
-          HBoxLayout.alignment: Qt.AlignBottom
-          text: "Bottom"
+      Widget {
+        HBoxLayout {
+          Label {
+            HBoxLayout.alignment: Qt.AlignRight
+            text: "Top"
+          }
+          Label {
+            HBoxLayout.alignment: Qt.AlignVCenter
+            text: "VCenter"
+          }
+          Label {
+            HBoxLayout.alignment: Qt.AlignBottom
+            text: "Bottom"
+          }
         }
       }
-    }
 
-    HBoxLayout {
-      VBoxLayout {
-        Label {
-          VBoxLayout.alignment: Qt.AlignLeft
-          text: "Left"
-        }
-        Label {
-          VBoxLayout.alignment: Qt.AlignHCenter
-          text: "HCenter"
-        }
-        Label {
-          VBoxLayout.alignment: Qt.AlignRight
-          text: "Right"
-        }
-      }
-      VBoxLayout {
-        TextEdit {
-          VBoxLayout.stretch: 1
+      HBoxLayout {
+        VBoxLayout {
+          Label {
+            VBoxLayout.alignment: Qt.AlignLeft
+            text: "Left"
+          }
+          Label {
+            VBoxLayout.alignment: Qt.AlignHCenter
+            text: "HCenter"
+          }
+          Label {
+            VBoxLayout.alignment: Qt.AlignRight
+            text: "Right"
+          }
         }
-        TextEdit {
-          VBoxLayout.stretch: 2
+        VBoxLayout {
+          TextEdit {
+            VBoxLayout.stretch: 1
+          }
+          TextEdit {
+            VBoxLayout.stretch: 2
+          }
         }
       }
     }