PdfMultiPageView: update search highlights when results change
In the single-page view, we bind to the PdfSearchModel.currentPageBoundingPolygons
property, which is convenient because it has a changed signal, so it
stays updated in all cases: when the user changes the search string,
when a different document is loaded, or when changing the current page.
In the multi-page view, we need to invoke a function to get the search
results on each page, because results are different on each page, and we
often need to show multiple pages at the same time. The challenge then
is how to ensure that it gets re-evaluated often enough. It requires
connecting to more than one signal; but there isn't any way to "kick" a
binding when some signal occurs, so the solution isn't very declarative,
unfortunately.
Change-Id: I72e7dad01b8cb6c43abcccf4fa46e443409b39e0
Reviewed-by:
Shawn Rutledge <shawn.rutledge@qt.io>
Showing
Please register or sign in to comment