summaryrefslogtreecommitdiffstats
path: root/tests/auto/uic
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-10-22 14:16:51 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-10-22 14:16:51 (GMT)
commit0e47bb7df6f2cd0ad61e3769d98c1ddf1cc6d30c (patch)
tree0850538f503f49f28fe19a40d0860ef8900b8bb1 /tests/auto/uic
parent2231e4f03c621459e1c261b2ed224a49877d2ddf (diff)
downloadQt-0e47bb7df6f2cd0ad61e3769d98c1ddf1cc6d30c.zip
Qt-0e47bb7df6f2cd0ad61e3769d98c1ddf1cc6d30c.tar.gz
Qt-0e47bb7df6f2cd0ad61e3769d98c1ddf1cc6d30c.tar.bz2
uic: Add autotests for layout alignment
Task-number: QTBUG-3120
Diffstat (limited to 'tests/auto/uic')
-rw-r--r--tests/auto/uic/baseline/gridalignment.ui49
-rw-r--r--tests/auto/uic/baseline/gridalignment.ui.h83
2 files changed, 132 insertions, 0 deletions
diff --git a/tests/auto/uic/baseline/gridalignment.ui b/tests/auto/uic/baseline/gridalignment.ui
new file mode 100644
index 0000000..11c28b1
--- /dev/null
+++ b/tests/auto/uic/baseline/gridalignment.ui
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>279</width>
+ <height>163</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" alignment="Qt::AlignLeft">
+ <widget class="QPushButton" name="pushButton">
+ <property name="text">
+ <string>Left</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" alignment="Qt::AlignTop">
+ <widget class="QPushButton" name="pushButton_3">
+ <property name="text">
+ <string>Top</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" alignment="Qt::AlignRight">
+ <widget class="QPushButton" name="pushButton_2">
+ <property name="text">
+ <string>Right</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" alignment="Qt::AlignBottom">
+ <widget class="QPushButton" name="pushButton_4">
+ <property name="text">
+ <string>Bottom</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/tests/auto/uic/baseline/gridalignment.ui.h b/tests/auto/uic/baseline/gridalignment.ui.h
new file mode 100644
index 0000000..8386190
--- /dev/null
+++ b/tests/auto/uic/baseline/gridalignment.ui.h
@@ -0,0 +1,83 @@
+/********************************************************************************
+** Form generated from reading UI file 'gridalignment.ui'
+**
+** Created: Fri Oct 22 14:33:59 2010
+** by: Qt User Interface Compiler version 4.8.0
+**
+** WARNING! All changes made in this file will be lost when recompiling UI file!
+********************************************************************************/
+
+#ifndef GRIDALIGNMENT_H
+#define GRIDALIGNMENT_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QGridLayout>
+#include <QtGui/QHeaderView>
+#include <QtGui/QPushButton>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_Form
+{
+public:
+ QGridLayout *gridLayout;
+ QPushButton *pushButton;
+ QPushButton *pushButton_3;
+ QPushButton *pushButton_2;
+ QPushButton *pushButton_4;
+
+ void setupUi(QWidget *Form)
+ {
+ if (Form->objectName().isEmpty())
+ Form->setObjectName(QString::fromUtf8("Form"));
+ Form->resize(279, 163);
+ gridLayout = new QGridLayout(Form);
+ gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
+ pushButton = new QPushButton(Form);
+ pushButton->setObjectName(QString::fromUtf8("pushButton"));
+
+ gridLayout->addWidget(pushButton, 0, 0, 1, 1, Qt::AlignLeft);
+
+ pushButton_3 = new QPushButton(Form);
+ pushButton_3->setObjectName(QString::fromUtf8("pushButton_3"));
+
+ gridLayout->addWidget(pushButton_3, 0, 1, 1, 1, Qt::AlignTop);
+
+ pushButton_2 = new QPushButton(Form);
+ pushButton_2->setObjectName(QString::fromUtf8("pushButton_2"));
+
+ gridLayout->addWidget(pushButton_2, 1, 0, 1, 1, Qt::AlignRight);
+
+ pushButton_4 = new QPushButton(Form);
+ pushButton_4->setObjectName(QString::fromUtf8("pushButton_4"));
+
+ gridLayout->addWidget(pushButton_4, 1, 1, 1, 1, Qt::AlignBottom);
+
+
+ retranslateUi(Form);
+
+ QMetaObject::connectSlotsByName(Form);
+ } // setupUi
+
+ void retranslateUi(QWidget *Form)
+ {
+ Form->setWindowTitle(QApplication::translate("Form", "Form", 0, QApplication::UnicodeUTF8));
+ pushButton->setText(QApplication::translate("Form", "Left", 0, QApplication::UnicodeUTF8));
+ pushButton_3->setText(QApplication::translate("Form", "Top", 0, QApplication::UnicodeUTF8));
+ pushButton_2->setText(QApplication::translate("Form", "Right", 0, QApplication::UnicodeUTF8));
+ pushButton_4->setText(QApplication::translate("Form", "Bottom", 0, QApplication::UnicodeUTF8));
+ } // retranslateUi
+
+};
+
+namespace Ui {
+ class Form: public Ui_Form {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // GRIDALIGNMENT_H