| 1 | // Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB). |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #include <QGuiApplication> |
| 5 | #include <QQuickView> |
| 6 | #include <QOpenGLContext> |
| 7 | |
| 8 | int main(int argc, char **argv) |
| 9 | { |
| 10 | QGuiApplication app(argc, argv); |
| 11 | |
| 12 | QSurfaceFormat format; |
| 13 | format.setVersion(2, 0); |
| 14 | format.setProfile(QSurfaceFormat::CompatibilityProfile); |
| 15 | format.setDepthBufferSize(24); |
| 16 | |
| 17 | QQuickView view; |
| 18 | view.setFormat(format); |
| 19 | view.resize(1200, 600); |
| 20 | view.setResizeMode(QQuickView::SizeRootObjectToView); |
| 21 | view.setSource(QUrl("qrc:/main.qml")); |
| 22 | view.show(); |
| 23 | |
| 24 | return app.exec(); |
| 25 | } |