summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Use fixed qt_add_resource BASE argumentPeter Varga2021-05-2810-74/+51
| | | | | | Task-number: QTBUG-86726 Change-Id: I33ec2a73254d9b44de83f4f5491f372b4bb9959b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Make handling of certificate errors possible from a signalAllan Sandfeld Jensen2021-05-253-5/+4
| | | | | | Task-number: QTBUG-74587 Change-Id: I9955a4c70b339523b5e9e9d6dffe928e61fbab90 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Bump the minimum required cmake version to 3.19Michal Klocek2021-05-2220-20/+20
| | | | | | | | | | | QtWebEngine requires support of TARGET_PROPERTY for genex in gn template generation to dump all compilation flags. This is supported since version 3.19, set examples to 3.16 as rest of the qt. Task-number: QTBUG-91760 Change-Id: Ifa5903c8c6efcb160db05baf1e18c865b48bcf39 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add examples to the cmake buildMichal Klocek2021-05-2224-27/+1249
| | | | | | | | | | | | | Add only quick and widget examples to the build for now. Update examples qmake files so the ci can also build qmake examples after the cmake bulid. Note this patch breakes qmake builds. Task-number: QTBUG-91760 Change-Id: Ia867a49bc3deab1967bdedcf525ad4afe3967c2a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-05-122-0/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webenginewidgets/printme/printhandler.cpp src/3rdparty src/core/api/qwebenginepage_p.h src/core/content_browser_client_qt.h src/core/web_contents_adapter_client.h src/core/web_contents_delegate_qt.cpp src/core/web_contents_delegate_qt.h src/webenginequick/api/qquickwebengineview_p_p.h tests/auto/quick/qmltests/data/tst_download.qml tests/auto/quick/qmltests/data/tst_viewSoure.qml tests/auto/widgets/loadsignals/tst_loadsignals.cpp tests/auto/widgets/qwebengineview/tst_qwebengineview.cpp Change-Id: I9c1819ec15e13d4f8e244defe860e26274b5d4be
| * Docs: Suggest to use higher DPI for printingSzabolcs David2021-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | When printing with the default resolution of QPrinter, rasterized images of pages are just too small to produce sharp result. Documentation of QPrinter also mentions that the default ScreenResolution should only be used for drafts. Change-Id: I5fe93f7985d16b1126cf2bbcb9b4a4ddbdfd21f2 Task-number: QTBUG-92185 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Support devtools close button in QuickNanoBrowserBalazs Egedi2021-04-151-0/+12
| | | | | | | | | | | | Fixes: QTBUG-92376 Change-Id: I8b9e35a75a4edb7f3a0dd858987b0f14993df65d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix 'WebEngine' ambiguity for Qt6Michal Klocek2021-04-138-10/+10
| | | | | | | | | | | | | | | | | | 'WebEngine' is a qml module, however name itself is ambiguous. Thefore now with Qt6 and with cmake port name the module as WebEngineQuick. Change-Id: I948672dd5d389a01c6a31ec871459164fd989c0f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-03-161-1/+0
|\| | | | | | | Change-Id: I0dd7c64669f4b130047a4a3836f62f7ee5b5f8d9
| * Fix crash on exit in quicknanobrowser when popupMichal Klocek2021-02-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Quicknanobrowser uses "onClosing: destory()" on main window. This however will end up badly when there is open popup, since calling destroy on exit immediately deletes WebContents, while popup is still not closed. Let the application first close/destroy popup and then main qquickwindow. Change-Id: I9c3974cd0f6126558b876cb0199928797e3f7a47 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2021-02-021-1/+3
|\| | | | | | | | | | | | | Conflicts: tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp Change-Id: Ibf03467e398f8dcdb5f950e1a70f3e4e591003db
| * Support devtools close buttonAllan Sandfeld Jensen2021-01-221-1/+3
| | | | | | | | | | Change-Id: Icad495c3bf144a4da53b2a60585dabb3fc36d3d6 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
* | Remove qwebengineview setter from qwebenginepageMichal Klocek2020-11-207-130/+181
| | | | | | | | | | Change-Id: Ifaac7287d24e38e04e217cae65f6e5294e8bdd9e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Update dependencies on 'dev' in qt/qtwebengineAllan Sandfeld Jensen2020-11-021-0/+1
| | | | | | | | | | Change-Id: I74c7293ebf5ace5bd07e3bf5455dd90bf4ed6380 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-11-026-8/+8
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/quick/dialogs/tst_dialogs.cpp Change-Id: I6840495a40e4e1e4512573c980816112ae5786d7
| * Compile pdf examplesMichal Klocek2020-10-066-8/+8
| | | | | | | | | | | | | | | | Fix typo in examples.pro and update related pro files. Drop dependency on widgets in qml examples. Change-Id: I571069e5b42cc0d0d94d54ce157a6e8636275cae Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Cleanup qwebenginescript and qwebenginescriptcollection apiMichal Klocek2020-09-281-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up script and collection apis: * do not allocate user_script on heap, there is no need for that. * remove isNull(), which was used by collection.findScript(name) * remove collection.size(), there is already collection.count() * remove collection.findScript(name), user can use findScripts(name) which returns list of scripts or empty list if not found * collection.findScripts(name) is simply collection.find(name) [ChangeLog] Removed QWebEngineScriptCollection::findScript(name), use QWebEngineScriptCollection::find(name) instead. Change-Id: Iecf8f1d7c26275b9ce3a1ea97cf4bd74b17f681e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix compilation after 757a9c21c1 in basePeter Varga2020-09-233-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Adaptations for the following qtbase changes: - acbf9a858b Cleanup QTypeInfo - 652bd1efca Make QStringList an alias to QList<QString> - 25351dcc54 Long live QKeyCombination! - ed8acbeb7c Automatically register data/debug stream operations in QMetaType - a735038376 Move QStateMachine from QtCore to QtScxml Change-Id: Ieb2677cd0572cc6dfe7be4b8f8dd4189a39bd3fe Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove default qwebenginesettings getterMichal Klocek2020-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | Remove defaultSettings() from qwebenginesettings and drop dependency on qwebenigineprofile in qwebenginesettings, let's see if we can also get rid of default profile later. Remove deprecated method globalSettings(). Change-Id: Ibccca50af237ed6a3dd32137d34f8e7e0e7357f3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Improve QWebEngineCertificateError apiMichal Klocek2020-08-282-26/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove const ref from QWebEngineCertificateError Q_GADGET is a value type, QWebEngineCertificateError is pass as const reference from api. This is not so useful since, in qml this will be anyway copied and for c++ this is not useful since reject, ignore, defer methods are all const. Therefore simply pass it by value. * make consistent naming defer(), acceptCertificate(), rejectCertificate() * remove properties 'differed', 'answered' which are use internally, user knows if he calls functions. * error.errorDescription -> error.description() * error.error() -> error.type() [ChangeLog] In QWebEngineCertificateError use acceptCertificate() instead of ignoreCertificiateError() Change-Id: I9ffa500a0a455d98445b066252dd283872740731 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Rename QWebEngineDownloadItem -> QWebEngineDownloadRequestMichal Klocek2020-08-185-26/+26
| | | | | | | | | | | | | | | | | | | | This fits better with other QWebEngine*Requests. [ChangeLog] QWebEngineDownloadItem is now QWebEngineDownloadRequest, also in qml. Change-Id: I506e9fac746b4f23ac0936c2fbe1c7472f4fda36 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Unify certificate error handlingMichal Klocek2020-08-142-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Before we move the certificate error to core, unify error handling between qml and widgets. [ChangeLog] WebPage::certificateError does not return bool it is enough to call defer, ignoreCertificateError() or rejectCertificate(). Change-Id: I14be40f1ab6b4cbded550260d66152f51cf47de2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove QT_VERSION from simplebrowserMichal Klocek2020-08-149-51/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 468c2d9a6 it is possible to compile simplebrowser with older versions of webengine. Unfortunately it makes example code harder to read and follow. It affects user experience and does not provide any benefits for the user. Moreover, with Qt6 changes to api this would even look more ugly and complexity will grow over time. Keep example code simple and clean, remove all the QT_VERSION checks. Change-Id: I2b2ea1d11c1e59bdcbbc7351daae5308f23890d3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge all webenginecontextmenudata wrappers into one classMichal Klocek2020-08-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce new class qwebenginecontextmenurequest in core which merges: * qquickwebenginecontextmenurequest * qwebenginecontextmenudata * implictly shared webenginecontextdata Unfortunately new class has to be QObject, since we want to reuse it qml. Q_GADGET can be used only as a value type, however we need to know if request is accepted or not in qml, therefore it must be passed as pointer. Since we use QObject now, class is no longer implicitly shared, however we only allocate request once and reuse the object for every new request (it is still copied in qml just to keep it aligned with other request handlers) [ChangleLog] QWebEngineContextMenuRequest is replacement for QWebEngineContextMenuData Change-Id: Ib387ec2065361a4bacc20675ca7352ab75a0e436 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Move QMenu handling from page to viewMichal Klocek2020-08-122-3/+3
| | | | | | | | | | | | | | | | [ChangeLog] createStandardContextMenu is moved from QWebEnginePage to QWebEngineView Change-Id: I08a7a1f7e55ca7396547006523cdec250a3ad117 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use QList instead of QVectorJarek Kobus2020-07-153-6/+6
| | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: I666a060351f73783e15e3f96884c9393a5cd7e46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adapt to newer dependenciesAllan Sandfeld Jensen2020-07-061-1/+0
| | | | | | | | | | | | Change-Id: I495880f56fbc10d8f332f26101f8a25c2a1c5631 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-06-291-5/+21
|\| | | | | | | | | | | | | Conflicts: src/src.pro Change-Id: I03c260ba676296f93d8137e79b46f3978f5f41ef
| * Fix 'qmake -r' runMichal Klocek2020-05-291-5/+21
| | | | | | | | | | | | | | Use current configure instead of qtHaveModule(). Change-Id: Ifc4500ff5eee4b997a0c02fb387d8918f88d06d1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Allan Sandfeld Jensen2020-05-151-2/+2
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-05-151-2/+2
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/pdf/quick/qquickpdfselection_p.h Change-Id: I6eec37a01347c2d47cbfc1114326dfc6b58719ff
| | * Support text selection handles in PDF viewsShawn Rutledge2020-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testing only on iOS so far; QtPdf doesn't work on Android because of QTBUG-83459, so we can only hope that this might perhaps be cross-platform, if only text selection handles actually existed on all platforms. As usual, text selection begins with a long-press; the iOS platform plugin intercepts that, and we get QInputMethodEvent::Cursor. There is no cursor, but we use the opportunity to do hit-testing, because the Cursor event is the only way that we receive the pixel location where the user is interacting. Then a popover menu appears, which contains Select and Select All, and either Copy or Paste depending on the qt_im_readonly property workaround. You don't get handles until you choose Select, which will select a word. That makes the popover menu disappear. You can use the toolbar button to copy to the clipboard. After that, you can drag either handle. inputMethodQuery(query, argument) is only ever called with ImCursorPosition regardless which handle is being dragged, so it doesn't make sense to change the selection there, even though that would be easy if we were given that information. Instead, the iOS platform figures out the character range for itself and sends a QInputMethodEvent::Selection event to tell us which text to select. And yet it still doesn't move the handles without being told: QGuiApplication::inputMethod()->update(Qt::ImCursorRectangle | Qt::ImAnchorRectangle) makes that happen. Then the popover menu will appear again, and now you can use the Copy function on it as an alternative way to copy text to the clipboard. By default, when the user does the initial long-press to start selecting text, the popover menu has Select, Select All, and Paste. In editable controls there is a second possible menu that normally has Cut, Copy, Paste and Delete. We are not able to enter that mode. So as a workaround, to substitute Copy instead of Paste, we set the qt_im_readonly property so that QIOSTextResponder::canPerformAction() can detect it and make the substition. Of course that won't work without the patch to 5.15; so you still get a useless Paste action on earlier Qt versions. Selecting a word via the Select popover menu item happens because iOS sends QKeySequence::MoveToPreviousWord and then QKeySequence::SelectNextWord. We spend time calling getSelectionAtIndex() twice because of that. With an actual keyboard, it should be possible to use keystrokes to extend the selection, but it doesn't seem to work yet with shift-arrows on a physical bluetooth keyboard on iOS. Select All on the popover menu works via inputMethodEvent() with attr QInputMethodEvent::Selection. Copy sends the standard copy key sequence, so keyReleaseEvent() handles it. We must rename the geometryChanged signal to selectedAreaChanged now that we're inheriting from QQuickItem, to avoid shadowing QQuickItem::geometryChanged. For this kind of text selection to work even when the rendering is scaled, it became necessary to inform PdfSelection of the rendering scale; so a renderScale property is added. Thus it is sensible (and a nice simplification in QML code) to use it for the fromPoint and toPoint properties, such that those are now expressed in pixels rather than points. Fixes: QTBUG-82441 Task-number: QTBUG-83811 Change-Id: I16ecd2db55c6a834be6139ce4f3aae23446fed54 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | Update 'dev' dependenciesAllan Sandfeld Jensen2020-05-144-6/+6
|/ / | | | | | | | | | | | | Including three compile fixes. Change-Id: I497ed359d229e869b67aa10e4114a37ceec4be97 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devAllan Sandfeld Jensen2020-04-276-4/+97
|\| | | | | | | | | | | | | | | Conflicts: configure.pri src/pdf/api/qpdfpagerenderer.h Change-Id: I7e68277080e29238bbfe8511539ea75b2db89489
| * Fix PgUp/PgDown navigation in the PDF multi-page exampleShawn Rutledge2020-04-161-2/+2
| | | | | | | | | | | | | | | | | | SpinBox.valueModified is emitted only when the user interactively modifies the value; so SpinBox.value++ doesn't trigger view.goToPage(). Therefore we should call it explicitly when handling those key shortcuts. Change-Id: I9648d1d143812d34d77218fd9ed7559415d13f63 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Workaround for failing import QtQml in PDF views on iOSShawn Rutledge2020-03-162-0/+2
| | | | | | | | | | | | | | | | | | The QtQml import isn't working in any QML dependencies unless it's detected because of having been included in the main QML file. Task-number: QTBUG-82873 Change-Id: I2ed2ca439651c40089d667255effb1155af58a01 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * Merge remote-tracking branch 'origin/wip/qtpdf' into 5.15Shawn Rutledge2020-03-116-2/+93
| |\ | | | | | | | | | Change-Id: Iacb9b45c2304ab123309f67c9b173ea39225898a
| | * PdfSelection: add selectAll() function; use in examplesShawn Rutledge2020-03-116-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | The usual shortcut (control-A) now selects all text on the current page, it is highlighted, and it can be copied to the clipboard. Change-Id: I5e6d9cae675862808f8b9027cb47024ca65cf2fd Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * PDF single-page example: shift content right as the search drawer opensShawn Rutledge2020-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This was done in 0b6a4d94945a975390b2574e6aff2568ebb7f061 for the multipage example. Change-Id: Ia5b51b9239521ab4d65e41aaebe52d178e75932d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * PdfSearchModel: provide ContextBefore and ContextAfterShawn Rutledge2020-02-262-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...as separate roles, to make alignment easier, and to avoid hard-coding HTML tags in the Context role as it was before. But the strings in these context roles are not always adjacent to the search results in geometric coordinates sometimes, in some PDF files, despite having adjacent character indices. I.e. the "next" character after the search string, or the "previous" character before it, could be anywhere on the page. Change-Id: Ief0a490b64fdb3c3ca98506926650648b609ece1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix building dev with newer QtBaseAllan Sandfeld Jensen2020-04-242-4/+4
|/ / | | | | | | | | Change-Id: I0d52e4f6684425cb15319760e0001bdb13846997 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Merge remote-tracking branch 'origin/wip/qtpdf' into 5.15v5.15.0-beta1Shawn Rutledge2020-02-2131-51/+931
|\| | | | | | | | | | | | | | | 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
| * PDF single-page example: move search field to the footerShawn Rutledge2020-02-201-71/+71
| | | | | | | | | | | | | | | | As with a2be3a7a79dc4fabe8675ea80a6ba550e0e4deec, this makes the search feature more discoverable and touch-friendly. Change-Id: I47e37273c583121d60985cc27c22f56e6d655ab0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Add PdfScrollablePageView, use it in the pdfviewer exampleShawn Rutledge2020-02-201-45/+30
| | | | | | | | | | | | | | | | | | PdfPageView might be useful in some cases, but we need to get feature parity with PdfMultiPageView as much as possible, including scrollbars. Including them in the view is convenient, but also less flexible. Change-Id: Ibbe6a090a5f5b1d340124986fe49672d682ddedb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * PdfMultiPageView: use TableView; horz. scroll; control page positionShawn Rutledge2020-02-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TableView is missing some features compared to ListView; so finding out where we currently are (which row) and programmatic positioning on a specific y coordinate of a specific row require some workarounds for now, including helpers in PdfDocument. TableView also assumes (and sporadically enforces) that all cells in a column have the same width. So we need a placeholder Item for each page. This also helps with rotation: the placeholder is now as wide as the window or the image, whichever is wider, and the "paper" is centered within; thus there's always room to rotate it. There's still some problem with setting contentY in goToPage() after the page has been zoomed to a size larger than the window: the values look correct, but it scrolls too far. But on the plus side, horizontal scrolling works. So now we attempt to control the horizontal position too: NavigationStack tracks it, and can go back to a previous position; and links can in theory jump to specific positions and zoom levels, scrolling horizontally such that a specific x coordinate is visible. Includes minor UI tweaks to make it look better on iOS. Change-Id: I643d8ef48ef815aeb49cae77dcb84c3682563d56 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * QtPdf examples: use test.pdf from resources if no file givenShawn Rutledge2020-02-1910-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * PDF multipage example: move search field to the footerShawn Rutledge2020-02-191-76/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hiding the search feature in a closed Drawer might not have been sufficiently touch-friendly and discoverable, for example on iOS where the user is not going to press control-F to start searching. But the top toolbar is too full to put the search field back up there. It's familiar from Firefox to have the search field at the bottom, and we have enough space for it there. So now you can search and jump around the search results without opening the drawer; but pressing Enter in the search field opens the drawer. Hopefully swiping to open the drawer is also convenient enough on touch platforms; otherwise we could add another button for that, perhaps at the left of the footer. Change-Id: Iaec63bc22b03e29156fee817d197daae5b0cf9d5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Enable mouse wheel scrolling in single-page PdfPageViewShawn Rutledge2020-02-171-0/+16
| | | | | | | | | | Change-Id: I20512187dcc872b2e0429968e9ad2a9899aee6c2 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Rearrange PdfPageView.qmlShawn Rutledge2020-02-172-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | Now it looks more similar to PdfMultiPageView.qml: public properties and functions are grouped by functionality, implementation details are "below the fold", and properties and functions that we don't want to expose as API are nested inside inner items. Also fixed ColumnLayout attached properties. Change-Id: Iafe6f983a34ca6bac9b0d4f3a26aba5a426e0232 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * PdfSearchModel: be QALM and find search results on all pagesShawn Rutledge2020-02-175-66/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a QAbstractListModel, so now PdfMultiPageView has a ListView in a left-side Drawer showing all results found so far. - In PdfMultiPageView, multiple pages exist at once, so it makes sense to use the same searchmodel for all. - It's faster and saves memory. - Search results on each page can be cached. - It's possible to show search results in a ListView or QListView. Change-Id: I66fba6975954a09a4d23262be87ff8cc25ee7478 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>