diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-03-15 11:48:29 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2010-03-15 11:48:29 (GMT) |
commit | f19290bd6d0babefd660aa589f004b1b1a8c2a30 (patch) | |
tree | 0938dc5981118bc41d837a0107fab96a96e86821 /examples/widgets/wiggly/dialog.cpp | |
parent | d73df73c556b0a225fdde7341549ed834bc691f4 (diff) | |
download | Qt-f19290bd6d0babefd660aa589f004b1b1a8c2a30.zip Qt-f19290bd6d0babefd660aa589f004b1b1a8c2a30.tar.gz Qt-f19290bd6d0babefd660aa589f004b1b1a8c2a30.tar.bz2 |
Added exit softkey to Wiggly example
Part of QtP delta reduction effort, original task: QTTH-42
Reviewed-by: Janne Anttila
Diffstat (limited to 'examples/widgets/wiggly/dialog.cpp')
-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){ |