summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorTero Ahola <tero.ahola@digia.com>2012-02-08 10:26:36 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-14 22:01:52 (GMT)
commit1566021e623fb79c4ff5475d51010765a3074bbb (patch)
treec7a6ad5d99740c9100ec18a51d9099b6aa39f4e8 /tests/manual
parent717e36037cf246aa201c0aaf15a5dcbd7883f159 (diff)
downloadQt-1566021e623fb79c4ff5475d51010765a3074bbb.zip
Qt-1566021e623fb79c4ff5475d51010765a3074bbb.tar.gz
Qt-1566021e623fb79c4ff5475d51010765a3074bbb.tar.bz2
Modified vertical alignments of simple widgets on OSX
Adding QCheckBox, QComboBox, QLineEdit etc. into an HBox layout or grid layout makes the layout look like a snake's trail. Fixed the positioning of these widgets to make the layouts visually more appealing. Updated qmacstyle auto-test accordingly. Task-number: QTBUG-13635 Ammended-by: Gabriel de Dietrich Ammended-by: Liang Qi Change-Id: Ic12346f764d8092292b8388f50d184b37d7cef5f (cherry picked from qtbase/8b6de4677142cab41790ca50ce6c7f1efbab5de8) Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/qlayout/gridwidget.cpp74
-rw-r--r--tests/manual/qlayout/gridwidget.h59
-rw-r--r--tests/manual/qlayout/hbwidget.cpp70
-rw-r--r--tests/manual/qlayout/hbwidget.h59
-rw-r--r--tests/manual/qlayout/main.cpp52
-rw-r--r--tests/manual/qlayout/mainwindow.cpp93
-rw-r--r--tests/manual/qlayout/mainwindow.h64
-rw-r--r--tests/manual/qlayout/qlayout.pro14
-rw-r--r--tests/manual/qlayout/vbwidget.cpp70
-rw-r--r--tests/manual/qlayout/vbwidget.h59
10 files changed, 614 insertions, 0 deletions
diff --git a/tests/manual/qlayout/gridwidget.cpp b/tests/manual/qlayout/gridwidget.cpp
new file mode 100644
index 0000000..821ed7f
--- /dev/null
+++ b/tests/manual/qlayout/gridwidget.cpp
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "gridwidget.h"
+#include <QGridLayout>
+#include <QPushButton>
+#include <QComboBox>
+#include <QDateTimeEdit>
+#include <QLineEdit>
+#include <QSpinBox>
+#include <QLabel>
+#include <QCheckBox>
+
+GridWidget::GridWidget(QWidget *parent) :
+ QWidget(parent)
+{
+ QGridLayout *hb = new QGridLayout(this);
+ QComboBox *combo = new QComboBox();
+ combo->addItem("123");
+ QComboBox *combo2 = new QComboBox();
+ combo2->setEditable(true);
+ combo2->addItem("123");
+
+ hb->addWidget(new QLabel("123"), 0, 0);
+ hb->addWidget(new QLabel("123"), 0, 1);
+ hb->addWidget(new QLineEdit("123"), 1, 0);
+ hb->addWidget(new QLineEdit("123"), 1, 1);
+ hb->addWidget(new QCheckBox("123"), 0, 2);
+ hb->addWidget(new QCheckBox("123"), 1, 2);
+ hb->addWidget(combo, 0, 3);
+ hb->addWidget(combo2, 1, 3);
+ hb->addWidget(new QDateTimeEdit(), 0, 4);
+ hb->addWidget(new QPushButton("123"), 1, 4);
+ hb->addWidget(new QSpinBox(), 0, 5);
+ hb->addWidget(new QSpinBox(), 1, 5);
+}
diff --git a/tests/manual/qlayout/gridwidget.h b/tests/manual/qlayout/gridwidget.h
new file mode 100644
index 0000000..481c17f
--- /dev/null
+++ b/tests/manual/qlayout/gridwidget.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GRIDWIDGET_H
+#define GRIDWIDGET_H
+
+#include <QWidget>
+
+class GridWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit GridWidget(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // GRIDWIDGET_H
diff --git a/tests/manual/qlayout/hbwidget.cpp b/tests/manual/qlayout/hbwidget.cpp
new file mode 100644
index 0000000..e4a568e
--- /dev/null
+++ b/tests/manual/qlayout/hbwidget.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "hbwidget.h"
+#include <QHBoxLayout>
+#include <QPushButton>
+#include <QComboBox>
+#include <QDateTimeEdit>
+#include <QLineEdit>
+#include <QSpinBox>
+#include <QLabel>
+#include <QCheckBox>
+
+HbWidget::HbWidget(QWidget *parent) :
+ QWidget(parent)
+{
+ QHBoxLayout *hb = new QHBoxLayout(this);
+ QComboBox *combo = new QComboBox(this);
+ combo->addItem("123");
+ QComboBox *combo2 = new QComboBox();
+ combo2->setEditable(true);
+ combo2->addItem("123");
+
+ hb->addWidget(new QLabel("123"));
+ hb->addWidget(new QLineEdit("123"));
+ hb->addWidget(combo);
+ hb->addWidget(combo2);
+ hb->addWidget(new QCheckBox("123"));
+ hb->addWidget(new QDateTimeEdit());
+ hb->addWidget(new QPushButton("123"));
+ hb->addWidget(new QSpinBox());
+}
diff --git a/tests/manual/qlayout/hbwidget.h b/tests/manual/qlayout/hbwidget.h
new file mode 100644
index 0000000..f8efdc3
--- /dev/null
+++ b/tests/manual/qlayout/hbwidget.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HBWIDGET_H
+#define HBWIDGET_H
+
+#include <QWidget>
+
+class HbWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit HbWidget(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // HBWIDGET_H
diff --git a/tests/manual/qlayout/main.cpp b/tests/manual/qlayout/main.cpp
new file mode 100644
index 0000000..7c6bbab
--- /dev/null
+++ b/tests/manual/qlayout/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+
+ return a.exec();
+}
diff --git a/tests/manual/qlayout/mainwindow.cpp b/tests/manual/qlayout/mainwindow.cpp
new file mode 100644
index 0000000..9899e0d
--- /dev/null
+++ b/tests/manual/qlayout/mainwindow.cpp
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+#include "hbwidget.h"
+#include "vbwidget.h"
+#include "gridwidget.h"
+#include <QGridLayout>
+#include <QComboBox>
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ QWidget *widget = new QWidget(this);
+ setCentralWidget(widget);
+ m_mainLayout = new QGridLayout(widget);
+
+ QComboBox *combo = new QComboBox();
+ combo->addItem("HBox Layout");
+ combo->addItem("VBox Layout");
+ combo->addItem("Grid Layout");
+ connect(combo, SIGNAL(currentIndexChanged(int)), this, SLOT(layoutIndexChanged(int)));
+ HbWidget *hbWidget = new HbWidget(this);
+
+ m_mainLayout->addWidget(combo);
+ m_mainLayout->addWidget(hbWidget);
+}
+
+MainWindow::~MainWindow()
+{
+
+}
+
+void MainWindow::layoutIndexChanged(int index)
+{
+ delete m_mainLayout->takeAt(1)->widget();
+
+ switch (index) {
+ case 0: {
+ HbWidget *hbWidget = new HbWidget(this);
+ m_mainLayout->addWidget(hbWidget);
+ break;
+ }
+ case 1: {
+ VbWidget *vbWidget = new VbWidget(this);
+ m_mainLayout->addWidget(vbWidget);
+ break;
+ }
+ default: {
+ GridWidget *gridW = new GridWidget(this);
+ m_mainLayout->addWidget(gridW);
+ break;
+ }
+ }
+}
diff --git a/tests/manual/qlayout/mainwindow.h b/tests/manual/qlayout/mainwindow.h
new file mode 100644
index 0000000..44ccd66
--- /dev/null
+++ b/tests/manual/qlayout/mainwindow.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+
+class QGridLayout;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+private slots:
+ void layoutIndexChanged(int index);
+
+private:
+ QGridLayout *m_mainLayout;
+};
+
+#endif // MAINWINDOW_H
diff --git a/tests/manual/qlayout/qlayout.pro b/tests/manual/qlayout/qlayout.pro
new file mode 100644
index 0000000..620cf41
--- /dev/null
+++ b/tests/manual/qlayout/qlayout.pro
@@ -0,0 +1,14 @@
+QT += core gui
+
+TEMPLATE = app
+
+SOURCES += main.cpp\
+ mainwindow.cpp \
+ hbwidget.cpp \
+ gridwidget.cpp \
+ vbwidget.cpp
+
+HEADERS += mainwindow.h \
+ hbwidget.h \
+ gridwidget.h \
+ vbwidget.h
diff --git a/tests/manual/qlayout/vbwidget.cpp b/tests/manual/qlayout/vbwidget.cpp
new file mode 100644
index 0000000..9033105
--- /dev/null
+++ b/tests/manual/qlayout/vbwidget.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "vbwidget.h"
+#include <QVBoxLayout>
+#include <QPushButton>
+#include <QComboBox>
+#include <QDateTimeEdit>
+#include <QLineEdit>
+#include <QSpinBox>
+#include <QLabel>
+#include <QCheckBox>
+
+VbWidget::VbWidget(QWidget *parent) :
+ QWidget(parent)
+{
+ QVBoxLayout *hb = new QVBoxLayout(this);
+ QComboBox *combo = new QComboBox(this);
+ combo->addItem("123");
+ QComboBox *combo2 = new QComboBox();
+ combo2->setEditable(true);
+ combo2->addItem("123");
+
+ hb->addWidget(new QLabel("123"));
+ hb->addWidget(new QLineEdit("123"));
+ hb->addWidget(combo);
+ hb->addWidget(combo2);
+ hb->addWidget(new QCheckBox("123"));
+ hb->addWidget(new QDateTimeEdit());
+ hb->addWidget(new QPushButton("123"));
+ hb->addWidget(new QSpinBox());
+}
diff --git a/tests/manual/qlayout/vbwidget.h b/tests/manual/qlayout/vbwidget.h
new file mode 100644
index 0000000..86559c5
--- /dev/null
+++ b/tests/manual/qlayout/vbwidget.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VBWIDGET_H
+#define VBWIDGET_H
+
+#include <QWidget>
+
+class VbWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit VbWidget(QWidget *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // VBWIDGET_H