diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-15 12:45:44 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-15 12:45:44 (GMT) |
commit | e52ed5b7375af6b9968ef91b296f52ee92dc6b29 (patch) | |
tree | 502690bec07caf547e9417f23160f02a113edc00 | |
parent | 02d1a0422c42889813bb2586503aff43a3509e09 (diff) | |
parent | f19290bd6d0babefd660aa589f004b1b1a8c2a30 (diff) | |
download | Qt-e52ed5b7375af6b9968ef91b296f52ee92dc6b29.zip Qt-e52ed5b7375af6b9968ef91b296f52ee92dc6b29.tar.gz Qt-e52ed5b7375af6b9968ef91b296f52ee92dc6b29.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-s60-public:
Added exit softkey to Wiggly example
-rw-r--r-- | examples/widgets/wiggly/dialog.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/widgets/wiggly/dialog.cpp b/examples/widgets/wiggly/dialog.cpp index 02d3272..0838472 100644 --- a/examples/widgets/wiggly/dialog.cpp +++ b/examples/widgets/wiggly/dialog.cpp @@ -56,6 +56,17 @@ Dialog::Dialog(QWidget *parent, bool smallScreen) layout->addWidget(lineEdit); setLayout(layout); +#ifdef QT_SOFTKEYS_ENABLED + QAction *exitAction = new QAction(tr("Exit"), this); + exitAction->setSoftKeyRole(QAction::NegativeSoftKey); + connect (exitAction, SIGNAL(triggered()),this, SLOT(close())); + addAction (exitAction); + + Qt::WindowFlags flags = windowFlags(); + flags |= Qt::WindowSoftkeysVisibleHint; + setWindowFlags(flags); +#endif + connect(lineEdit, SIGNAL(textChanged(QString)), wigglyWidget, SLOT(setText(QString))); if (!smallScreen){ |