path: root/examples/pdf/pdfviewer/viewer.qrc
diff options
authorShawn Rutledge <>2020-02-19 17:47:01 +0100
committerShawn Rutledge <>2020-02-19 18:21:00 +0100
commit1acd9ad2bfa1c54f19fa8a71fb41e8a90233f76b (patch)
treec1561556ef91ffe8a0ccd90aed16095a176fdf7a /examples/pdf/pdfviewer/viewer.qrc
parenta2be3a7a79dc4fabe8675ea80a6ba550e0e4deec (diff)
QtPdf examples: use test.pdf from resources if no file given
On iOS, the native FileDialog doesn't work, sharing doesn't work, and packaging files along with the application requires manual effort; so a PDF file in resources seems to be the easiest alternative to make the examples demo-able. QPdfDocument wants a file path, because it uses QFile; but we like to use URLs in Qt Quick. So it's a bit of an impedance mismatch, there are several choices about when and where to do the conversion, and it's hard to say which way is more correct. This way happens to work for now. Also do the rest of the things necessary to get this working on iOS. Change-Id: Icb8614d5eed2510f101aefba534ef80cf890518f Reviewed-by: Shawn Rutledge <>
Diffstat (limited to 'examples/pdf/pdfviewer/viewer.qrc')
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/pdf/pdfviewer/viewer.qrc b/examples/pdf/pdfviewer/viewer.qrc
index 9698a2689..1b6fa52f7 100644
--- a/examples/pdf/pdfviewer/viewer.qrc
+++ b/examples/pdf/pdfviewer/viewer.qrc
@@ -1,6 +1,7 @@
<qresource prefix="/pdfviewer">
+ <file>resources/document-open.svg</file>
@@ -9,11 +10,11 @@
+ <file>resources/test.pdf</file>
- <file>resources/document-open.svg</file>