aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml')
-rw-r--r--src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml
new file mode 100644
index 0000000000..a2fd762d75
--- /dev/null
+++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip-pressandhold.qml
@@ -0,0 +1,15 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+//! [1]
+Button {
+ text: qsTr("Button")
+
+ ToolTip.visible: pressed
+ ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
+ ToolTip.text: qsTr("This tool tip is shown after pressing and holding the button down.")
+}
+//! [1]