| 1 |
< |
#define USING_VM_TABLET_WARNING_FIX // Comment this line if not using a mac vm |
| 2 |
< |
|
| 3 |
< |
#ifdef USING_VM_TABLET_WARNING_FIX |
| 4 |
< |
#include <qapplication.h> |
| 5 |
< |
void myMessageOutput(QtMsgType type, const char *msg); |
| 6 |
< |
#endif |
| 7 |
< |
|
| 8 |
< |
#include <QtGui/QApplication> |
| 1 |
> |
#include <QtWidgets/QApplication> |
| 2 |
|
#include "mainwindow.h" |
| 3 |
|
|
| 4 |
+ |
|
| 5 |
|
int main(int argc, char *argv[]) |
| 6 |
|
{ |
| 7 |
|
|
| 14 |
– |
#ifdef USING_VM_TABLET_WARNING_FIX |
| 15 |
– |
qInstallMsgHandler(myMessageOutput); |
| 16 |
– |
#endif |
| 17 |
– |
|
| 8 |
|
QApplication a(argc, argv); |
| 9 |
|
MainWindow w; |
| 10 |
|
w.show(); |
| 11 |
|
a.setStyleSheet("QStatusBar::item { border: 0px; }"); //hide QLabels border in status bar //http://qt-project.org/forums/viewthread/18743 |
| 12 |
< |
|
| 12 |
> |
|
| 13 |
> |
// XmlToolsInterface *xmlToolsWindow = new XmlToolsInterface(new Logger(UtilVago::getAppPath(), GlobalVars::AppLogName)); |
| 14 |
> |
// xmlToolsWindow->show(); //it destroys itself when finished. |
| 15 |
> |
|
| 16 |
|
return a.exec(); |
| 17 |
|
} |
| 18 |
|
|
| 26 |
– |
#ifdef USING_VM_TABLET_WARNING_FIX |
| 27 |
– |
void myMessageOutput(QtMsgType type, const char *msg) |
| 28 |
– |
{ |
| 29 |
– |
switch (type) { |
| 30 |
– |
case QtWarningMsg: |
| 31 |
– |
if(QString(msg)=="QCocoaView handleTabletEvent: This tablet device is unknown (received no proximity event for it). Discarding event."){ // ignore this message |
| 32 |
– |
return; |
| 33 |
– |
} |
| 34 |
– |
else{ |
| 35 |
– |
fprintf(stderr, "%s\n", msg); |
| 36 |
– |
break; |
| 37 |
– |
} |
| 38 |
– |
case QtFatalMsg: |
| 39 |
– |
fprintf(stderr, "%s\n", msg); |
| 40 |
– |
abort(); |
| 41 |
– |
default: |
| 42 |
– |
fprintf(stderr, "%s\n", msg); |
| 43 |
– |
break; |
| 44 |
– |
} |
| 45 |
– |
} |
| 46 |
– |
#endif |