diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-02-04 16:42:27 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-02-04 16:47:36 +0100 |
commit | 1f785521ab6982e7395af223e28137d65f8ead12 (patch) | |
tree | bffe19fd23865ac96987a2ae5876a2846d376ec1 | |
parent | bf3133033236afb34974fec63ac21e1749d503ad (diff) |
Temporarily use MouseArea for links in Pdf(Multi)PageView
HoverHandler.cursorShape is new API in 5.15, so we have to use
MouseArea for 5.14.
This patch can be reverted as soon as 5.14 is no longer supported.
Change-Id: I1c830215729038095ec33ece36a1a83108cbd835
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | src/pdf/quick/qml/PdfMultiPageView.qml | 17 | ||||
-rw-r--r-- | src/pdf/quick/qml/PdfPageView.qml | 13 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/pdf/quick/qml/PdfMultiPageView.qml b/src/pdf/quick/qml/PdfMultiPageView.qml index 36b194812..f64238eec 100644 --- a/src/pdf/quick/qml/PdfMultiPageView.qml +++ b/src/pdf/quick/qml/PdfMultiPageView.qml @@ -47,12 +47,12 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 +import QtQuick 2.14 +import QtQuick.Controls 2.14 +import QtQuick.Layouts 1.14 import QtQuick.Pdf 5.15 -import QtQuick.Shapes 1.15 -import QtQuick.Window 2.15 +import QtQuick.Shapes 1.14 +import QtQuick.Window 2.14 Item { // public API @@ -159,9 +159,10 @@ Item { y: rect.y * paper.__pageScale width: rect.width * paper.__pageScale height: rect.height * paper.__pageScale - HoverHandler { cursorShape: Qt.PointingHandCursor } // 5.15 only (QTBUG-68073) - TapHandler { - onTapped: { + MouseArea { // TODO switch to TapHandler / HoverHandler in 5.15 + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { if (page >= 0) listView.currentIndex = page else diff --git a/src/pdf/quick/qml/PdfPageView.qml b/src/pdf/quick/qml/PdfPageView.qml index 041054e59..cf287ecf7 100644 --- a/src/pdf/quick/qml/PdfPageView.qml +++ b/src/pdf/quick/qml/PdfPageView.qml @@ -33,10 +33,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import QtQuick 2.15 -import QtQuick.Controls 2.15 +import QtQuick 2.14 +import QtQuick.Controls 2.14 import QtQuick.Pdf 5.15 -import QtQuick.Shapes 1.15 +import QtQuick.Shapes 1.14 Rectangle { id: paper @@ -198,9 +198,10 @@ Rectangle { y: rect.y * paper.__pageScale width: rect.width * paper.__pageScale height: rect.height * paper.__pageScale - HoverHandler { cursorShape: Qt.PointingHandCursor } // 5.15 onward (QTBUG-68073) - TapHandler { - onTapped: { + MouseArea { // TODO switch to TapHandler / HoverHandler in 5.15 + anchors.fill: parent + cursorShape: Qt.PointingHandCursor + onClicked: { if (page >= 0) navigationStack.currentPage = page else |