aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/applicationwindow/data/activeFocusControl.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-11-29 21:56:36 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-10 21:03:43 +0000
commiteba39a3ba543c04747aa837b064a35ea6b32ed89 (patch)
tree4e13f4f31b560cac3ffeb2c587016dbebad788e2 /tests/auto/applicationwindow/data/activeFocusControl.qml
parentc47aa91ed7e0e120d810dc81863758715b928d1b (diff)
Add ApplicationWindow::activeFocusControl
This makes it possible for ApplicationWindow to visualize key focus navigation with a single focus rectangle that follows the currently active focus control. Change-Id: Ief92bcdc64891b7baa3503216137665a8badcd17 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'tests/auto/applicationwindow/data/activeFocusControl.qml')
-rw-r--r--tests/auto/applicationwindow/data/activeFocusControl.qml105
1 files changed, 105 insertions, 0 deletions
diff --git a/tests/auto/applicationwindow/data/activeFocusControl.qml b/tests/auto/applicationwindow/data/activeFocusControl.qml
new file mode 100644
index 00000000..51b3241f
--- /dev/null
+++ b/tests/auto/applicationwindow/data/activeFocusControl.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** 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 Qt.labs.controls 1.0
+
+ApplicationWindow {
+ width: 400
+ height: 400
+
+ property alias container_column: column
+ property alias textInput_column: ti_column
+ property alias textEdit_column: te_column
+ property alias textField_column: tf_column
+ property alias textArea_column: ta_column
+ property alias spinBox_column: sp_column
+ property alias spinContent_column: sp_column.contentItem
+
+ property alias container_frame: frame
+ property alias textInput_frame: ti_frame
+ property alias textEdit_frame: te_frame
+ property alias textField_frame: tf_frame
+ property alias textArea_frame: ta_frame
+ property alias spinBox_frame: sp_frame
+ property alias spinContent_frame: sp_frame.contentItem
+
+ Column {
+ id: column
+
+ TextInput {
+ id: ti_column
+ }
+ TextEdit {
+ id: te_column
+ }
+ TextField {
+ id: tf_column
+ }
+ TextArea {
+ id: ta_column
+ }
+ SpinBox {
+ id: sp_column
+ }
+ }
+
+ Frame {
+ id: frame
+
+ Column {
+ TextInput {
+ id: ti_frame
+ }
+ TextEdit {
+ id: te_frame
+ }
+ TextField {
+ id: tf_frame
+ }
+ TextArea {
+ id: ta_frame
+ }
+ SpinBox {
+ id: sp_frame
+ }
+ }
+ }
+}