equal
deleted
inserted
replaced
2 #include <QDesktopServices> |
2 #include <QDesktopServices> |
3 #include <QDir> |
3 #include <QDir> |
4 #include "mainwindow.h" |
4 #include "mainwindow.h" |
5 #include "dbtools.h" |
5 #include "dbtools.h" |
6 #include <QDebug> |
6 #include <QDebug> |
|
7 |
|
8 // Tech Tip: By default, Actions is added to the Options menu. The |
|
9 // idea is to support context menus on non-touch mobiles. |
|
10 void disableContextMenu() |
|
11 { |
|
12 QWidgetList widgets = QApplication::allWidgets(); |
|
13 QWidget* wid=0; |
|
14 foreach(wid,widgets) |
|
15 { |
|
16 wid->setContextMenuPolicy(Qt::NoContextMenu); |
|
17 } |
|
18 } |
|
19 |
7 |
20 |
8 int main(int argc, char *argv[]) |
21 int main(int argc, char *argv[]) |
9 { |
22 { |
10 QApplication a(argc, argv); |
23 QApplication a(argc, argv); |
11 MainWindow w; |
24 MainWindow w; |
14 QString dbLocation(":/contacts.csv"); |
27 QString dbLocation(":/contacts.csv"); |
15 |
28 |
16 qDebug() << "dbLocation=" << dbLocation << endl; |
29 qDebug() << "dbLocation=" << dbLocation << endl; |
17 dbt.importCSV(dbLocation); |
30 dbt.importCSV(dbLocation); |
18 |
31 |
|
32 disableContextMenu(); |
|
33 |
19 #if defined(Q_WS_S60) |
34 #if defined(Q_WS_S60) |
20 w.showMaximized(); |
35 w.showMaximized(); |
21 #else |
36 #else |
22 w.show(); |
37 w.show(); |
23 #endif |
38 #endif |