contactengine/main.cpp
changeset 33 f6cf541961ad
parent 27 afa910b5ae81
child 34 93c5a58496b6
--- a/contactengine/main.cpp	Fri Aug 13 16:18:58 2010 -0700
+++ b/contactengine/main.cpp	Mon Aug 16 15:57:18 2010 -0700
@@ -5,6 +5,19 @@
 #include "dbtools.h"
 #include <QDebug>
 
+// Tech Tip: By default, Actions is added to the Options menu. The
+// idea is to support context menus on non-touch mobiles.
+void disableContextMenu()
+{
+    QWidgetList widgets = QApplication::allWidgets();
+    QWidget* wid=0;
+    foreach(wid,widgets)
+    {
+        wid->setContextMenuPolicy(Qt::NoContextMenu);
+    }
+}
+
+
 int main(int argc, char *argv[])
 {
     QApplication a(argc, argv);
@@ -16,6 +29,8 @@
     qDebug() << "dbLocation=" << dbLocation << endl;
     dbt.importCSV(dbLocation);
 
+    disableContextMenu();
+
 #if defined(Q_WS_S60)
     w.showMaximized();
 #else