From bf3133033236afb34974fec63ac21e1749d503ad Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 20 Jan 2020 15:12:01 +0100 Subject: Add PdfMultiPageView So far it's a ListView with a page per delegate. Many features are working, but zooming and rotation are not working yet. Change-Id: I9ee7aa60ad4411bd8734fe2cd987a68906a5cf57 Reviewed-by: Shawn Rutledge --- examples/pdf/multipage/multipage.pro | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 examples/pdf/multipage/multipage.pro (limited to 'examples/pdf/multipage/multipage.pro') diff --git a/examples/pdf/multipage/multipage.pro b/examples/pdf/multipage/multipage.pro new file mode 100644 index 000000000..5fff58fe1 --- /dev/null +++ b/examples/pdf/multipage/multipage.pro @@ -0,0 +1,14 @@ +TEMPLATE = app + +QT += qml quick pdf widgets + +SOURCES += main.cpp + +RESOURCES += \ + viewer.qrc +EXAMPLE_FILES = \ + viewer.qml + +target.path = $$[QT_INSTALL_EXAMPLES]/pdf/multipage +INSTALLS += target + -- cgit v1.2.3 From 1acd9ad2bfa1c54f19fa8a71fb41e8a90233f76b Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 19 Feb 2020 17:47:01 +0100 Subject: 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 --- examples/pdf/multipage/multipage.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/pdf/multipage/multipage.pro') diff --git a/examples/pdf/multipage/multipage.pro b/examples/pdf/multipage/multipage.pro index 5fff58fe1..5df9e653d 100644 --- a/examples/pdf/multipage/multipage.pro +++ b/examples/pdf/multipage/multipage.pro @@ -1,6 +1,6 @@ TEMPLATE = app -QT += qml quick pdf widgets +QT += qml quick pdf widgets svg SOURCES += main.cpp -- cgit v1.2.3