summaryrefslogtreecommitdiffstats
path: root/examples/pdf/pdfviewer/main.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-02-21 11:38:27 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2020-02-21 11:40:49 +0100
commitd9349a299f66fb154ad24f410451872a7ca253fb (patch)
tree2e8258ef3679707a2a9245c85bc8490251b3e256 /examples/pdf/pdfviewer/main.cpp
parent50bc8b124705c33c5e27f035b1eab756e14247ba (diff)
parentc0aa9d794378846e4cc0b6fe94f2765bc31cefdd (diff)
Merge remote-tracking branch 'origin/wip/qtpdf' into 5.15v5.15.0-beta1
The feature set is mostly in place (except for some known shortcomings) and we need the merge to build it on iOS. Task-number: QTBUG-69519 Change-Id: Ib1ac82a9a7e0830d98d1c4327a1b15d4d7f4d4c1
Diffstat (limited to 'examples/pdf/pdfviewer/main.cpp')
-rw-r--r--examples/pdf/pdfviewer/main.cpp4
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();