From fd5845f50ebeea342f8db7ca70f267bdfa12bb68 Mon Sep 17 00:00:00 2001 From: Kevin Krammer Date: Wed, 17 Oct 2012 19:29:38 +0200 Subject: [PATCH] Move test widget into a tab widget --- layouts.qml | 104 ++++++++++++++++++++++++++++++---------------------------- 1 files changed, 54 insertions(+), 50 deletions(-) diff --git a/layouts.qml b/layouts.qml index 6fce9c9..9f40194 100644 --- a/layouts.qml +++ b/layouts.qml @@ -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 + } } } } -- 1.7.2.5