diff options
Diffstat (limited to 'basicsuite/qt5-cinematicdemo/main.cpp')
-rw-r--r-- | basicsuite/qt5-cinematicdemo/main.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/basicsuite/qt5-cinematicdemo/main.cpp b/basicsuite/qt5-cinematicdemo/main.cpp new file mode 100644 index 0000000..81c1c85 --- /dev/null +++ b/basicsuite/qt5-cinematicdemo/main.cpp @@ -0,0 +1,18 @@ +#include <QGuiApplication> +#include <QQuickView> + +int main(int argc, char* argv[]) +{ + QGuiApplication app(argc,argv); + QQuickView view; + view.setResizeMode(QQuickView::SizeRootObjectToView); + view.setSource(QUrl::fromLocalFile(QCoreApplication::applicationDirPath() + QLatin1String("/Qt5_CinematicExperience.qml"))); + + const QString lowerArgument = QString::fromLatin1(argv[1]).toLower(); + if (lowerArgument == QLatin1String("--fullscreen")) { + view.showFullScreen(); + } else { + view.show(); + } + return app.exec(); +} |