diff --git a/src/pdf/qpdflinkmodel.cpp b/src/pdf/qpdflinkmodel.cpp index 8b49fec21d6c0a21c8446ad2d544586bacb466d5..96e6ddd5c9524e4db606b934a4898a8b87563e6b 100644 --- a/src/pdf/qpdflinkmodel.cpp +++ b/src/pdf/qpdflinkmodel.cpp @@ -179,7 +179,7 @@ void QPdfLinkModelPrivate::update() if (!ok) break; if (hasX && hasY) - linkData.location = QPointF(x, y); + linkData.location = QPointF(x, pageHeight - y); if (hasZoom) linkData.zoom = zoom; links << linkData; diff --git a/src/pdf/quick/qml/PdfMultiPageView.qml b/src/pdf/quick/qml/PdfMultiPageView.qml index b64f4457671b7ac04264c1c81825a22c99912d50..b4bc61c64f8883b1437ebc5aeaffd0fd37ae581e 100644 --- a/src/pdf/quick/qml/PdfMultiPageView.qml +++ b/src/pdf/quick/qml/PdfMultiPageView.qml @@ -242,8 +242,10 @@ Item { width: rect.width * paper.pageScale height: rect.height * paper.pageScale MouseArea { // TODO switch to TapHandler / HoverHandler in 5.15 + id: linkMA anchors.fill: parent cursorShape: Qt.PointingHandCursor + hoverEnabled: true onClicked: { if (page >= 0) root.goToLocation(page, location, zoom) @@ -251,6 +253,14 @@ Item { Qt.openUrlExternally(url) } } + ToolTip { + visible: linkMA.containsMouse + delay: 1000 + text: page >= 0 ? + ("page " + (page + 1) + + " location " + location.x.toFixed(1) + ", " + location.y.toFixed(1) + + " zoom " + zoom) : url + } } } }