diff options
author | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2013-01-14 17:44:23 +0100 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@digia.com> | 2013-01-15 13:51:34 +0100 |
commit | 229105ba89d4c90cc6e8bf99eaf9957bead317d8 (patch) | |
tree | 862d7bc9e5a4614f2da56bd35fd79ac6bd8099f4 /tests | |
parent | 2151e763e4921fdd1e2dbfc8278679dcfd87e22b (diff) | |
download | qt-creator-229105ba89d4c90cc6e8bf99eaf9957bead317d8.tar.gz |
QmlDesigner: adding manual test files for Qt Quick 2.0
Change-Id: I44d3a4165d1ff12488bcc63f19765bc7cf91bc18
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Diffstat (limited to 'tests')
17 files changed, 943 insertions, 0 deletions
diff --git a/tests/manual/qml/testfiles_quick2/components/MyButton.qml b/tests/manual/qml/testfiles_quick2/components/MyButton.qml new file mode 100644 index 0000000000..0aa1b1b09e --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/components/MyButton.qml @@ -0,0 +1,36 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 64 + height: 48 + color: "Red" +} diff --git a/tests/manual/qml/testfiles_quick2/empty.qml b/tests/manual/qml/testfiles_quick2/empty.qml new file mode 100644 index 0000000000..35e165eb5d --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/empty.qml @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 640 + height: 480 +} diff --git a/tests/manual/qml/testfiles_quick2/flipable.qml b/tests/manual/qml/testfiles_quick2/flipable.qml new file mode 100644 index 0000000000..e841a33736 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/flipable.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Flipable { + width: 640 + height: 480 + front: Text { + text: "front" + } + back: Text { + text: "back" + } + +} diff --git a/tests/manual/qml/testfiles_quick2/helloworld.qml b/tests/manual/qml/testfiles_quick2/helloworld.qml new file mode 100644 index 0000000000..c1ab8bb3b1 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/helloworld.qml @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 200 + height: 200 + Text { + x: 66 + y: 93 + text: "Hello World" + } +} diff --git a/tests/manual/qml/testfiles_quick2/helloworld_inverted.qml b/tests/manual/qml/testfiles_quick2/helloworld_inverted.qml new file mode 100644 index 0000000000..90c741da41 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/helloworld_inverted.qml @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 200 + height: 200 + color: "black" + Text { + x: 66 + y: 93 + text: "Hello World" + color: "white" + } +} diff --git a/tests/manual/qml/testfiles_quick2/images.qml b/tests/manual/qml/testfiles_quick2/images.qml new file mode 100644 index 0000000000..8a45b2b173 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/images.qml @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 640 + height: 480 + + Image { + id: image1 + x: 20 + y: 18 + source: "images/qtcreator.png" + } + + Image { + id: image2 + x: 327 + y: 18 + source: "images/qtcreator.jpg" + } + + Image { + id: image3 + x: 20 + y: 288 + source: "images/qtcreator.ico" + } +} diff --git a/tests/manual/qml/testfiles_quick2/images/qtcreator.ico b/tests/manual/qml/testfiles_quick2/images/qtcreator.ico Binary files differnew file mode 100644 index 0000000000..6bca2585a6 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/images/qtcreator.ico diff --git a/tests/manual/qml/testfiles_quick2/images/qtcreator.jpg b/tests/manual/qml/testfiles_quick2/images/qtcreator.jpg Binary files differnew file mode 100644 index 0000000000..d856c51b43 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/images/qtcreator.jpg diff --git a/tests/manual/qml/testfiles_quick2/images/qtcreator.png b/tests/manual/qml/testfiles_quick2/images/qtcreator.png Binary files differnew file mode 100644 index 0000000000..1cf9f91170 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/images/qtcreator.png diff --git a/tests/manual/qml/testfiles_quick2/listmodel.qml b/tests/manual/qml/testfiles_quick2/listmodel.qml new file mode 100644 index 0000000000..667b671dd5 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/listmodel.qml @@ -0,0 +1,39 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +ListModel { + id: myModel + ListElement { + content: "foo" + text: "bar" + } + +} diff --git a/tests/manual/qml/testfiles_quick2/listview.qml b/tests/manual/qml/testfiles_quick2/listview.qml new file mode 100644 index 0000000000..f3cbeb2a84 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/listview.qml @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + width: 200 + height: 100 + + ListView { + anchors.fill: parent; + model: ListModel { + ListElement { + name: "BMW" + speed: 200 + } + ListElement { + name: "Mercedes" + speed: 180 + } + ListElement { + name: "Audi" + speed: 190 + } + ListElement { + name: "VW" + speed: 180 + } + } + + + delegate: Item { + height: 40 + Row { + spacing: 10 + Text { + text: name; + font.bold: true + } + + Text { text: "speed: " + speed } + } + + + } + } +} diff --git a/tests/manual/qml/testfiles_quick2/positioners.qml b/tests/manual/qml/testfiles_quick2/positioners.qml new file mode 100644 index 0000000000..c7abfd4ac8 --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/positioners.qml @@ -0,0 +1,209 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 232 + height: 232 + + Column { + id: column + x: 39 + y: 20 + spacing: 2 + + Rectangle { + width: 20 + height: 20 + color: "#c2d11b" + } + + Rectangle { + width: 20 + height: 20 + color: "#d11b1b" + } + + Rectangle { + width: 20 + height: 20 + color: "#1e3fd3" + } + + Rectangle { + width: 20 + height: 20 + color: "#3bd527" + } + + Rectangle { + width: 20 + height: 20 + color: "#8726b7" + } + + Rectangle { + width: 20 + height: 20 + color: "#8b8b8b" + } + } + + Row { + id: row + x: 78 + y: 20 + Rectangle { + width: 20 + height: 20 + color: "#c2d11b" + } + + Rectangle { + width: 20 + height: 20 + color: "#d11b1b" + } + + Rectangle { + width: 20 + height: 20 + color: "#1e3fd3" + } + + Rectangle { + width: 20 + height: 20 + color: "#3bd527" + } + + Rectangle { + width: 20 + height: 20 + color: "#8726b7" + } + + Rectangle { + width: 20 + height: 20 + color: "#8b8b8b" + } + spacing: 2 + } + + Flow { + id: flow + x: 78 + y: 53 + width: 84 + height: 31 + + Rectangle { + width: 20 + height: 20 + color: "#c2d11b" + } + + Rectangle { + width: 20 + height: 20 + color: "#d11b1b" + } + + Rectangle { + width: 20 + height: 20 + color: "#1e3fd3" + } + + Rectangle { + width: 20 + height: 20 + color: "#3bd527" + } + + Rectangle { + width: 20 + height: 20 + color: "#8726b7" + } + + Rectangle { + width: 20 + height: 20 + color: "#8b8b8b" + } + spacing: 2 + } + + Grid { + id: grid + x: 78 + y: 108 + columns: 3 + Rectangle { + width: 20 + height: 20 + color: "#c2d11b" + } + + Rectangle { + width: 20 + height: 20 + color: "#d11b1b" + } + + Rectangle { + width: 20 + height: 20 + color: "#1e3fd3" + } + + Rectangle { + width: 20 + height: 20 + color: "#3bd527" + } + + Rectangle { + width: 20 + height: 20 + color: "#8726b7" + } + + spacing: 2 + Rectangle { + width: 20 + height: 20 + color: "#8b8b8b" + } + } + +} diff --git a/tests/manual/qml/testfiles_quick2/states.qml b/tests/manual/qml/testfiles_quick2/states.qml new file mode 100644 index 0000000000..3b39eedb5a --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/states.qml @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + id: rect + width: 200 + height: 200 + Text { + id: text + x: 66 + y: 93 + text: "Base State" + } + states: [ + State { + name: "State1" + PropertyChanges { + target: rect + color: "blue" + } + PropertyChanges { + target: text + text: "State1" + } + }, + State { + name: "State2" + PropertyChanges { + target: rect + color: "gray" + } + PropertyChanges { + target: text + text: "State2" + } + } + ] + + Image { + id: image1 + x: 41 + y: 46 + source: "images/qtcreator.png" + } +} diff --git a/tests/manual/qml/testfiles_quick2/subcomponent.qml b/tests/manual/qml/testfiles_quick2/subcomponent.qml new file mode 100644 index 0000000000..5586feb44a --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/subcomponent.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 640 + height: 480 + Component { + id: redSquare + Rectangle { + color: "red" + width: 100 + height: 100 + } + } + + Loader { sourceComponent: redSquare;} + Loader { sourceComponent: redSquare; x: 20 } +} diff --git a/tests/manual/qml/testfiles_quick2/testfiles_quick2.qmlproject b/tests/manual/qml/testfiles_quick2/testfiles_quick2.qmlproject new file mode 100644 index 0000000000..337caca3fe --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/testfiles_quick2.qmlproject @@ -0,0 +1,14 @@ +import QmlProject 1.1 + +Project { + // Scan current directory for .qml, .js, and image files + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } +} diff --git a/tests/manual/qml/testfiles_quick2/usingbutton.qml b/tests/manual/qml/testfiles_quick2/usingbutton.qml new file mode 100644 index 0000000000..76dfbe7f5b --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/usingbutton.qml @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 +import "components" as X + +Rectangle { + width: 640 + height: 480 + + X.MyButton { + } + +} diff --git a/tests/manual/qml/testfiles_quick2/views.qml b/tests/manual/qml/testfiles_quick2/views.qml new file mode 100644 index 0000000000..164b86e75a --- /dev/null +++ b/tests/manual/qml/testfiles_quick2/views.qml @@ -0,0 +1,198 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of Qt Creator. +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 2.0 + +Rectangle { + width: 640 + height: 480 + + GridView { + id: grid_view1 + x: 35 + y: 28 + width: 140 + height: 140 + cellHeight: 70 + delegate: Item { + x: 5 + height: 50 + Column { + Rectangle { + width: 40 + height: 40 + color: colorCode + anchors.horizontalCenter: parent.horizontalCenter + } + + Text { + x: 5 + text: name + anchors.horizontalCenter: parent.horizontalCenter + font.bold: true + } + spacing: 5 + } + } + model: ListModel { + ListElement { + name: "Grey" + colorCode: "grey" + } + + ListElement { + name: "Red" + colorCode: "red" + } + + ListElement { + name: "Blue" + colorCode: "blue" + } + + ListElement { + name: "Green" + colorCode: "green" + } + } + cellWidth: 70 + } + + ListView { + id: list_view1 + x: 248 + y: 28 + width: 110 + height: 160 + delegate: Item { + x: 5 + height: 40 + Row { + id: row1 + Rectangle { + width: 40 + height: 40 + color: colorCode + } + + Text { + text: name + anchors.verticalCenter: parent.verticalCenter + font.bold: true + } + spacing: 10 + } + } + model: ListModel { + ListElement { + name: "Grey" + colorCode: "grey" + } + + ListElement { + name: "Red" + colorCode: "red" + } + + ListElement { + name: "Blue" + colorCode: "blue" + } + + ListElement { + name: "Green" + colorCode: "green" + } + } + } + + PathView { + id: path_view1 + x: 35 + y: 239 + width: 250 + height: 130 + delegate: Component { + Column { + Rectangle { + width: 40 + height: 40 + color: colorCode + anchors.horizontalCenter: parent.horizontalCenter + } + + Text { + x: 5 + text: name + anchors.horizontalCenter: parent.horizontalCenter + font.bold: true + } + spacing: 5 + } + } + model: ListModel { + ListElement { + name: "Grey" + colorCode: "grey" + } + + ListElement { + name: "Red" + colorCode: "red" + } + + ListElement { + name: "Blue" + colorCode: "blue" + } + + ListElement { + name: "Green" + colorCode: "green" + } + } + path: Path { + PathQuad { + x: 120 + y: 25 + controlY: 75 + controlX: 260 + } + + PathQuad { + x: 120 + y: 100 + controlY: 75 + controlX: -20 + } + startY: 100 + startX: 120 + } + } +} |