summaryrefslogtreecommitdiffstats
path: root/src/webenginequick/doc/src
diff options
context:
space:
mode:
authorBalazs Egedi <egedib@inf.u-szeged.hu>2022-02-18 13:04:19 +0100
committerKirill Burtsev <kirill.burtsev@qt.io>2022-05-04 03:00:16 +0200
commit828ee197647a7462c10243c0261e7bced9bbcb65 (patch)
tree4c6bc198ea33a753e6af4efa736741ea10cea280 /src/webenginequick/doc/src
parent57a38f05d9a0898bffa077a5caaf48fde370cb02 (diff)
Quick: Add support for replacing touch handles with delegates
Task-number: QTBUG-85043 Change-Id: I1c87aff352e07eb309d5ba8747b9e50a191d478e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/webenginequick/doc/src')
-rw-r--r--src/webenginequick/doc/src/custom_touch_handle.qdoc52
-rw-r--r--src/webenginequick/doc/src/webengineview_lgpl.qdoc10
2 files changed, 62 insertions, 0 deletions
diff --git a/src/webenginequick/doc/src/custom_touch_handle.qdoc b/src/webenginequick/doc/src/custom_touch_handle.qdoc
new file mode 100644
index 000000000..8ef193d16
--- /dev/null
+++ b/src/webenginequick/doc/src/custom_touch_handle.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2022 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \qmltype CustomTouchHandle
+ \inqmlmodule QtWebEngine
+ \since QtWebEngine 6.4
+
+ \brief Data class for representing the touch handle QML delegate.
+
+ The handle's position, opacity, and visibility are updated automatically.
+ The delegate should be a QML Item or any QML type which inherits it.
+
+ The following code uses a custom touch handle delegate:
+
+ \code
+ WebEngineView {
+ // ...
+ touchHandleDelegate: Rectangle {
+ color: "red"
+ }
+ // ...
+ }
+ \endcode
+
+ \note The bounding box which propagates the touch event is provided by
+ Chromium and the text selection can be moved even if there is no handle drawn.
+*/
diff --git a/src/webenginequick/doc/src/webengineview_lgpl.qdoc b/src/webenginequick/doc/src/webengineview_lgpl.qdoc
index 7de68f243..ae3ea1c23 100644
--- a/src/webenginequick/doc/src/webengineview_lgpl.qdoc
+++ b/src/webenginequick/doc/src/webengineview_lgpl.qdoc
@@ -1491,3 +1491,13 @@
\sa TouchSelectionMenuRequest
*/
+
+/*!
+ \qmlproperty CustomTouchHandle WebEngineView::touchHandleDelegate
+ \since QtWebEngine 6.4
+
+ If a QML Item is set, the default touch handles will not be shown and
+ this item will be displayed as touch handles.
+
+ \sa {WebEngine Qt Quick Custom Touch Handle Example}
+*/