diff options
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){ |