diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2009-12-11 20:30:00 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2009-12-11 20:30:00 (GMT) |
commit | 1860aa75013a4d91b553c9dadf8130cc06a96641 (patch) | |
tree | d7db8692fbb684ad5e1cb14151682aaebb89765a /tests/manual | |
parent | b77bd0095345d28f8aaee199c0a1d53457e2ad3f (diff) | |
parent | 9aa60dfdf5b4837b9ceb15d8fcbc96f37dce7b5a (diff) | |
download | Qt-1860aa75013a4d91b553c9dadf8130cc06a96641.zip Qt-1860aa75013a4d91b553c9dadf8130cc06a96641.tar.gz Qt-1860aa75013a4d91b553c9dadf8130cc06a96641.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into qt-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (23 commits)
Check if the timeout expired during the time update in qt_safe_select
Fix crashes when deleting QWidgets and QGraphicsItems in touch event handlers.
Fix tst_QTouchEvent::touchUpdateAndEndNeverPropagate()
Document QTextEncoder::fromUnicode as QT3 support member
Install private headers when configuring Qt with -developer-build.
Ensure that QProcessEnvironment::operator== doesn't crash
Fixes a qfileinfo autotest.
Fix compilation if QT_NO_DATESTRING is defined.
Fix compilation: private headers must be #included with ""
Use realpath() only on systems we know it works on.
Mixed up top/bottom
QGtkStyle: support for the inner-border property in GtkButtons
Fixed uninitialized background artifacts in QWidget::render.
Compile with -no-exceptions on Mac.
Fixed searching and copy/paste from PDF documents.
Autotest: ensure that QSharedPointer does proper autocasting through
Compile on Windows CE.
Add copyright header so the autotest will pass.
Add support for the Selected QIcon::Mode when rendering the systray icon (Mac)
Added a manual test for testing a z-order of overlapping widgets.
...
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/qwidget_zorder/main.cpp | 118 | ||||
-rw-r--r-- | tests/manual/qwidget_zorder/qwidget_zorder.pro | 6 |
2 files changed, 124 insertions, 0 deletions
diff --git a/tests/manual/qwidget_zorder/main.cpp b/tests/manual/qwidget_zorder/main.cpp new file mode 100644 index 0000000..fe8e0a2 --- /dev/null +++ b/tests/manual/qwidget_zorder/main.cpp @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** 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, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtGui> + +class Widget : public QWidget +{ + Q_OBJECT +public: + Widget() + { + QWidget *stackWidget = new QWidget; + stackWidget->setFixedSize(400, 300); + button = new QPushButton("pushbutton", stackWidget); + plainTextEdit = new QPlainTextEdit(stackWidget); + plainTextEdit->setWordWrapMode(QTextOption::NoWrap); + QString s = "foo bar bar foo foo bar bar foo"; + for (int i = 0; i < 10; ++i) { + plainTextEdit->appendPlainText(s); + s.remove(1, 2); + } + calendar = new QCalendarWidget(stackWidget); + button->move(10, 10); + button->resize(100, 100); + plainTextEdit->move(30, 70); + plainTextEdit->resize(100, 100); + calendar->move(80, 40); + + QWidget *buttonOps = new QWidget; + QVBoxLayout *l = new QVBoxLayout(buttonOps); + QPushButton *lower = new QPushButton("button: lower"); + connect(lower, SIGNAL(clicked()), button, SLOT(lower())); + l->addWidget(lower); + QPushButton *raise = new QPushButton("button: raise"); + connect(raise, SIGNAL(clicked()), button, SLOT(raise())); + l->addWidget(raise); + + lower = new QPushButton("calendar: lower"); + connect(lower, SIGNAL(clicked()), calendar, SLOT(lower())); + l->addWidget(lower); + raise = new QPushButton("calendar: raise"); + connect(raise, SIGNAL(clicked()), calendar, SLOT(raise())); + l->addWidget(raise); + QPushButton *stackUnder = new QPushButton("calendar: stack under textedit"); + connect(stackUnder, SIGNAL(clicked()), this, SLOT(stackCalendarUnderTextEdit())); + l->addWidget(stackUnder); + + lower = new QPushButton("lower textedit"); + connect(lower, SIGNAL(clicked()), plainTextEdit, SLOT(lower())); + l->addWidget(lower); + raise = new QPushButton("raise textedit"); + connect(raise, SIGNAL(clicked()), plainTextEdit, SLOT(raise())); + l->addWidget(raise); + + QHBoxLayout *mainLayout = new QHBoxLayout(this); + mainLayout->addWidget(buttonOps); + mainLayout->addWidget(stackWidget); + } + +private Q_SLOTS: + void stackCalendarUnderTextEdit() + { + calendar->stackUnder(plainTextEdit); + } + +private: + QPushButton *button; + QPlainTextEdit *plainTextEdit; + QCalendarWidget *calendar; +}; + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + Widget w; + w.show(); + return app.exec(); +} + +#include "main.moc" diff --git a/tests/manual/qwidget_zorder/qwidget_zorder.pro b/tests/manual/qwidget_zorder/qwidget_zorder.pro new file mode 100644 index 0000000..5526f91 --- /dev/null +++ b/tests/manual/qwidget_zorder/qwidget_zorder.pro @@ -0,0 +1,6 @@ +TEMPLATE = app +DEPENDPATH += . +INCLUDEPATH += . + +# Input +SOURCES += main.cpp |