diff options
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml')
-rw-r--r-- | src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml new file mode 100644 index 0000000000..1abaab2d62 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-tooltip.qml @@ -0,0 +1,27 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Item { + id: root + width: 360 + height: button.height * 2 + + property Button button: children[0] + + Binding { target: root.button; property: "down"; value: root.Window.active } + Binding { target: root.button.anchors; property: "bottom"; value: root.bottom } + Binding { target: root.button.anchors; property: "horizontalCenter"; value: root.horizontalCenter } + + //! [1] + Button { + text: qsTr("Save") + + ToolTip.visible: down + ToolTip.text: qsTr("Save the active project") + } + //! [1] +} |