| 1 |
#include <qglobal.h> |
| 2 |
|
| 3 |
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) |
| 4 |
#include <QtGui/QApplication> |
| 5 |
#else |
| 6 |
#ifdef MPS_USE_QML |
| 7 |
#include <QtGui/QGuiApplication> |
| 8 |
#else |
| 9 |
#include <QtWidgets/QApplication> |
| 10 |
#endif |
| 11 |
#endif |
| 12 |
|
| 13 |
#ifdef MPS_USE_QML |
| 14 |
#include <QtQml/QQmlApplicationEngine> |
| 15 |
#include "mainqmlview.h" |
| 16 |
#else |
| 17 |
#include "mainwindow.h" |
| 18 |
#endif |
| 19 |
|
| 20 |
using namespace xmpsolve; |
| 21 |
|
| 22 |
int main(int argc, char *argv[]) |
| 23 |
{ |
| 24 |
#ifdef MPS_USE_QML |
| 25 |
QGuiApplication a(argc, argv); |
| 26 |
#else |
| 27 |
QApplication a(argc, argv); |
| 28 |
#endif |
| 29 |
|
| 30 |
#ifdef MPS_USE_QML |
| 31 |
MainQmlView w; |
| 32 |
#else |
| 33 |
MainWindow w; |
| 34 |
|
| 35 |
// In case the user wants to open a .pol file, try to load it |
| 36 |
if (argc > 1) { |
| 37 |
w.openPolFile(argv[1]); |
| 38 |
} |
| 39 |
|
| 40 |
w.show(); |
| 41 |
#endif |
| 42 |
|
| 43 |
return a.exec(); |
| 44 |
} |