summaryrefslogtreecommitdiffstats
path: root/examples/pdf/pdfviewer/viewer.qrc
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2020-02-19 17:47:01 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>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 <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/pdf/pdfviewer/viewer.qrc')
-rw-r--r--examples/pdf/pdfviewer/viewer.qrc3
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 @@
<RCC>
<qresource prefix="/pdfviewer">
<file>viewer.qml</file>
+ <file>resources/document-open.svg</file>
<file>resources/edit-clear.svg</file>
<file>resources/edit-copy.svg</file>
<file>resources/go-down-search.svg</file>
@@ -9,11 +10,11 @@
<file>resources/go-up-search.svg</file>
<file>resources/rotate-left.svg</file>
<file>resources/rotate-right.svg</file>
+ <file>resources/test.pdf</file>
<file>resources/zoom-in.svg</file>
<file>resources/zoom-fit-best.svg</file>
<file>resources/zoom-fit-width.svg</file>
<file>resources/zoom-original.svg</file>
<file>resources/zoom-out.svg</file>
- <file>resources/document-open.svg</file>
</qresource>
</RCC>