Add close softkey to dialogs on Symbian.
authorAkos Polster <polster@maczok.pipacs.com>
Sun, 12 Sep 2010 00:13:42 +0000 (02:13 +0200)
committerAkos Polster <polster@maczok.pipacs.com>
Sun, 12 Sep 2010 00:13:42 +0000 (02:13 +0200)
mainwindow.cpp
widgets/dyalog.cpp

index d565d4b..850c070 100755 (executable)
@@ -34,7 +34,7 @@
 #include "translucentbutton.h"
 
 #ifdef DORIAN_TEST_MODEL
-#include "modeltest.h"
+#   include "modeltest.h"
 #endif
 
 #ifdef Q_WS_MAC
index d31e4d5..06db690 100644 (file)
@@ -42,6 +42,15 @@ Dyalog::Dyalog(QWidget *parent, bool showButtons):
     scroller->setWidget(content);
     content->show();
     scroller->setWidgetResizable(true);
+
+#ifdef Q_OS_SYMBIAN
+    QAction *closeAction = new QAction(tr("Close"), this);
+    closeAction->setSoftKeyRole(QAction::CancelSoftKey);
+    connect(closeAction, SIGNAL(triggered()), this, SLOT(reject()));
+    QList<QAction *> softKeys;
+    softKeys.append(closeAction);
+    setSoftKeys(softKeys);
+#endif // Q_OS_SYMBIAN
 }
 
 void Dyalog::addWidget(QWidget *widget)