aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/fonts/deployment.pri14
-rw-r--r--tests/manual/fonts/fonts.pro14
-rw-r--r--tests/manual/fonts/main.cpp49
-rw-r--r--tests/manual/fonts/main.qml75
-rw-r--r--tests/manual/fonts/qml.qrc6
-rw-r--r--tests/manual/manual.pro3
6 files changed, 160 insertions, 1 deletions
diff --git a/tests/manual/fonts/deployment.pri b/tests/manual/fonts/deployment.pri
new file mode 100644
index 00000000..c89af25a
--- /dev/null
+++ b/tests/manual/fonts/deployment.pri
@@ -0,0 +1,14 @@
+unix:!android {
+ isEmpty(target.path) {
+ qnx {
+ target.path = /tmp/$${TARGET}/bin
+ } else {
+ target.path = /opt/$${TARGET}/bin
+ }
+ export(target.path)
+ }
+ INSTALLS += target
+}
+
+export(INSTALLS)
+
diff --git a/tests/manual/fonts/fonts.pro b/tests/manual/fonts/fonts.pro
new file mode 100644
index 00000000..36e70f7e
--- /dev/null
+++ b/tests/manual/fonts/fonts.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+
+QT += qml quick
+
+SOURCES += main.cpp
+
+RESOURCES += qml.qrc
+
+# Additional import path used to resolve QML modules in Qt Creator's code model
+QML_IMPORT_PATH =
+
+# Default rules for deployment.
+include(deployment.pri)
+
diff --git a/tests/manual/fonts/main.cpp b/tests/manual/fonts/main.cpp
new file mode 100644
index 00000000..9a40ad6d
--- /dev/null
+++ b/tests/manual/fonts/main.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** 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:LGPL3$
+** 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 http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/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 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+
+ return app.exec();
+}
+
diff --git a/tests/manual/fonts/main.qml b/tests/manual/fonts/main.qml
new file mode 100644
index 00000000..11298660
--- /dev/null
+++ b/tests/manual/fonts/main.qml
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** 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 QtQuick.Controls 2.0
+import QtQuick.Templates 2.0 as T
+import QtQuick.Layouts 1.2
+
+ApplicationWindow {
+ visible: true
+ width: 480
+ height: 640
+ title: qsTr("Hello World")
+
+ T.Control {
+ id: control
+ ColumnLayout {
+ Button { text: "Button" }
+ CheckBox { text: "CheckBox" }
+ GroupBox { title: "GroupBox" }
+ RadioButton { text: "RadioButton" }
+ Switch { text: "Switch" }
+ TabButton {
+ text: "TabButton"
+ font.pointSize: control.font.pointSize
+ }
+ ToggleButton { text: "ToggleButton" }
+ ToolButton { text: "ToolButton" }
+ Slider {
+ from: 16
+ to: 48
+ stepSize: 1
+ onValueChanged: control.font.pointSize = value
+ }
+ }
+ }
+}
+
diff --git a/tests/manual/fonts/qml.qrc b/tests/manual/fonts/qml.qrc
new file mode 100644
index 00000000..0ff3892d
--- /dev/null
+++ b/tests/manual/fonts/qml.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file>main.qml</file>
+ </qresource>
+</RCC>
+
diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro
index 787b99e1..8dac1b34 100644
--- a/tests/manual/manual.pro
+++ b/tests/manual/manual.pro
@@ -1,3 +1,4 @@
TEMPLATE = subdirs
SUBDIRS += \
- gifs
+ gifs \
+ fonts