diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-09-27 15:14:32 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-09-27 13:42:30 +0000 |
commit | 576a97774e04858adee9f2080e485a715e985820 (patch) | |
tree | 32b2327d90713ed345d51fdd5bb51cbbe79615cc /tests/auto/qquickmenu/data/applicationwindow.qml | |
parent | 125c08cad177edf8baba9a6ca84425255db9c500 (diff) |
Rename tst_menu to tst_QQuickMenu
Change-Id: I1c7e1a2b337e9d16bc6c9b098db08f29f1b9d1e6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/qquickmenu/data/applicationwindow.qml')
-rw-r--r-- | tests/auto/qquickmenu/data/applicationwindow.qml | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/tests/auto/qquickmenu/data/applicationwindow.qml b/tests/auto/qquickmenu/data/applicationwindow.qml new file mode 100644 index 00000000..265a2f1a --- /dev/null +++ b/tests/auto/qquickmenu/data/applicationwindow.qml @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** 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. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.6 +import QtQuick.Controls 2.1 + +ApplicationWindow { + title: "Test Application Window" + width: 400 + height: 400 + + property alias emptyMenu: emptyMenu + property alias menu: menu + property alias menuButton: menuButton + + Menu { + id: emptyMenu + } + + Menu { + id: menu + + MenuItem { + objectName: "firstMenuItem" + text: "A" + } + MenuItem { + objectName: "secondMenuItem" + text: "B" + } + MenuItem { + objectName: "thirdMenuItem" + text: "C" + } + } + + Button { + id: menuButton + x: 250 + visible: false + text: "Open Menu" + onClicked: menu.open() + } +} |