examples/widgets/wiggly/dialog.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 30 5dc02b23752f
--- a/examples/widgets/wiggly/dialog.cpp	Fri Apr 16 15:50:13 2010 +0300
+++ b/examples/widgets/wiggly/dialog.cpp	Mon May 03 13:17:34 2010 +0300
@@ -57,15 +57,16 @@
     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);
 
-    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){