summaryrefslogtreecommitdiffstats
path: root/tests/manual/picking-qml/main.cpp
blob: e197ce968769278e10a9016095cd166f86a8a8b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause


#include <Qt3DQuickExtras/qt3dquickwindow.h>
#include <QGuiApplication>
#include <Qt3DQuick/QQmlAspectEngine>
#include <QQmlContext>

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);
    Qt3DExtras::Quick::Qt3DQuickWindow view;

    view.engine()->qmlEngine()->rootContext()->setContextProperty("_view", &view);
    view.setSource(QUrl(QStringLiteral("qrc:/main.qml")));
    view.show();

    return app.exec();
}