diff options
Diffstat (limited to 'examples/pdf/pdfviewer/main.cpp')
-rw-r--r-- | examples/pdf/pdfviewer/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/pdf/pdfviewer/main.cpp b/examples/pdf/pdfviewer/main.cpp index 6b94a3de1..5f65e3061 100644 --- a/examples/pdf/pdfviewer/main.cpp +++ b/examples/pdf/pdfviewer/main.cpp @@ -53,17 +53,19 @@ int main(int argc, char* argv[]) { - QApplication app(argc, argv); QCoreApplication::setApplicationName("Qt Quick PDF Viewer Example"); QCoreApplication::setOrganizationName("QtProject"); QCoreApplication::setApplicationVersion(QT_VERSION_STR); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QApplication app(argc, argv); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:///pdfviewer/viewer.qml"))); if (app.arguments().count() > 1) { QUrl toLoad = QUrl::fromUserInput(app.arguments().at(1)); engine.rootObjects().first()->setProperty("source", toLoad); + } else { + engine.rootObjects().first()->setProperty("source", QStringLiteral("resources/test.pdf")); } return app.exec(); |