12345678910111213141516171819 |
- #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();
- }
|