aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/qml-debugging/main.cpp
blob: e28c5e1269def6572dc7605c2ef0fdac0a32d36b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <QtGlobal>
#include <QString>

#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QGuiApplication>
#include <QQmlApplicationEngine>
typedef QGuiApplication Application;
#define AH_SO_THIS_IS_QT5
#else
#include <QApplication>
#include <QDeclarativeView>
#define AH_SO_THIS_IS_QT4
typedef QApplication Application;
#endif

int main(int argc, char *argv[])
{
    Application app(argc, argv);
#ifdef AH_SO_THIS_IS_QT5
    QQmlApplicationEngine engine;
    engine.load(QUrl("blubb"));
#else
    QDeclarativeView view;
    view.setSource(QUrl("blubb"));
#endif

    return app.exec();
}