summaryrefslogtreecommitdiffstats
path: root/tests/quicktestbrowser/ButtonWithMenu.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/quicktestbrowser/ButtonWithMenu.qml')
-rw-r--r--tests/quicktestbrowser/ButtonWithMenu.qml33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/quicktestbrowser/ButtonWithMenu.qml b/tests/quicktestbrowser/ButtonWithMenu.qml
deleted file mode 100644
index 56a4d3533..000000000
--- a/tests/quicktestbrowser/ButtonWithMenu.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
-import QtQuick 2.3
-import QtQuick.Controls 1.2
-
-// The QtQuick controls guys are slackers, so we need to make our own stuff
-
-ToolButton {
- id: root
- property Menu longPressMenu
- function showMenu() {
- longPressMenu.__popup(Qt.rect(0, root.height, 0, 0), 0)
- }
-
- Binding {
- target: longPressMenu
- property: "__visualItem"
- value: root
- }
-
- MouseArea {
- anchors.fill: parent
- acceptedButtons: Qt.LeftButton | Qt.RightButton
- onClicked: {
- if (mouse.button == Qt.RightButton)
- showMenu()
- else
- root.clicked()
- }
- onPressAndHold: showMenu()
- }
-}