aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/customitems
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/customitems')
-rw-r--r--examples/quick/customitems/.prev_CMakeLists.txt4
-rw-r--r--examples/quick/customitems/CMakeLists.txt8
-rw-r--r--examples/quick/customitems/customitems.pro11
-rw-r--r--examples/quick/customitems/dialcontrol/CMakeLists.txt82
-rw-r--r--examples/quick/customitems/dialcontrol/Dial.qml49
-rw-r--r--examples/quick/customitems/dialcontrol/QuitButton.qml15
-rw-r--r--examples/quick/customitems/dialcontrol/background.png (renamed from examples/quick/customitems/dialcontrol/content/background.png)bin35876 -> 35876 bytes
-rw-r--r--examples/quick/customitems/dialcontrol/content/Dial.qml96
-rw-r--r--examples/quick/customitems/dialcontrol/content/QuitButton.qml61
-rw-r--r--examples/quick/customitems/dialcontrol/dialcontrol.qml58
-rw-r--r--examples/quick/customitems/dialcontrol/dialcontrol.qrc16
-rw-r--r--examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc29
-rw-r--r--examples/quick/customitems/dialcontrol/main.cpp53
-rw-r--r--examples/quick/customitems/dialcontrol/needle.png (renamed from examples/quick/customitems/dialcontrol/content/needle.png)bin342 -> 342 bytes
-rw-r--r--examples/quick/customitems/dialcontrol/needle_shadow.png (renamed from examples/quick/customitems/dialcontrol/content/needle_shadow.png)bin632 -> 632 bytes
-rw-r--r--examples/quick/customitems/dialcontrol/overlay.png (renamed from examples/quick/customitems/dialcontrol/content/overlay.png)bin3564 -> 3564 bytes
-rw-r--r--examples/quick/customitems/dialcontrol/quit.png (renamed from examples/quick/customitems/dialcontrol/content/quit.png)bin583 -> 583 bytes
-rw-r--r--examples/quick/customitems/flipable/5_heart.png (renamed from examples/quick/customitems/flipable/content/5_heart.png)bin3872 -> 3872 bytes
-rw-r--r--examples/quick/customitems/flipable/9_club.png (renamed from examples/quick/customitems/flipable/content/9_club.png)bin6135 -> 6135 bytes
-rw-r--r--examples/quick/customitems/flipable/CMakeLists.txt51
-rw-r--r--examples/quick/customitems/flipable/Card.qml43
-rw-r--r--examples/quick/customitems/flipable/back.png (renamed from examples/quick/customitems/flipable/content/back.png)bin1418 -> 1418 bytes
-rw-r--r--examples/quick/customitems/flipable/content/Card.qml90
-rw-r--r--examples/quick/customitems/flipable/doc/src/flipable.qdoc29
-rw-r--r--examples/quick/customitems/flipable/flipable.qml58
-rw-r--r--examples/quick/customitems/flipable/flipable.qrc10
-rw-r--r--examples/quick/customitems/flipable/main.cpp53
-rw-r--r--examples/quick/customitems/maskedmousearea/CMakeLists.txt65
-rw-r--r--examples/quick/customitems/maskedmousearea/images/cloud_1.pngbin49395 -> 0 bytes
-rw-r--r--examples/quick/customitems/maskedmousearea/images/cloud_2.pngbin32288 -> 0 bytes
-rw-r--r--examples/quick/customitems/maskedmousearea/images/moon.pngbin13263 -> 0 bytes
-rw-r--r--examples/quick/customitems/maskedmousearea/main.cpp64
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.cpp151
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.h109
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.pro17
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.qml142
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.qmlproject16
-rw-r--r--examples/quick/customitems/maskedmousearea/maskedmousearea.qrc8
-rw-r--r--examples/quick/customitems/painteditem/CMakeLists.txt82
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt28
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/plugin.h12
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/qmldir (renamed from examples/quick/customitems/painteditem/TextBalloonPlugin/qmldir)1
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/textballoon.cpp56
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/textballoon.h31
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/textballoon.pro28
-rw-r--r--examples/quick/customitems/painteditem/TextBalloon/textballoon.qrc5
-rw-r--r--examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h59
-rw-r--r--examples/quick/customitems/painteditem/doc/src/textballoons.qdoc51
-rw-r--r--examples/quick/customitems/painteditem/main.cpp4
-rw-r--r--examples/quick/customitems/painteditem/painteditem.pro31
-rw-r--r--examples/quick/customitems/painteditem/painteditem.qrc3
-rw-r--r--examples/quick/customitems/painteditem/textballoon.cpp103
-rw-r--r--examples/quick/customitems/painteditem/textballoon.h78
-rw-r--r--examples/quick/customitems/painteditem/textballoons.qml63
-rw-r--r--examples/quick/customitems/painteditem/textballoonuser.pro10
-rw-r--r--examples/quick/customitems/progressbar/content/ProgressBar.qml93
-rw-r--r--examples/quick/customitems/progressbar/content/background.pngbin299 -> 0 bytes
-rw-r--r--examples/quick/customitems/progressbar/main.qml83
-rw-r--r--examples/quick/customitems/scrollbar/ScrollBar.qml84
-rw-r--r--examples/quick/customitems/scrollbar/doc/images/qml-scrollbar-example.pngbin157358 -> 0 bytes
-rw-r--r--examples/quick/customitems/scrollbar/doc/src/scrollbar.qdoc38
-rw-r--r--examples/quick/customitems/scrollbar/main.cpp51
-rw-r--r--examples/quick/customitems/scrollbar/main.qml103
-rw-r--r--examples/quick/customitems/scrollbar/pics/niagara_falls.jpgbin142510 -> 0 bytes
-rw-r--r--examples/quick/customitems/scrollbar/scrollbar.pro9
-rw-r--r--examples/quick/customitems/scrollbar/scrollbar.qmlproject16
-rw-r--r--examples/quick/customitems/scrollbar/scrollbar.qrc7
-rw-r--r--examples/quick/customitems/searchbox/SearchBox.qml119
-rw-r--r--examples/quick/customitems/searchbox/images/clear.pngbin320 -> 0 bytes
-rw-r--r--examples/quick/customitems/searchbox/images/lineedit-bg-focus.pngbin297 -> 0 bytes
-rw-r--r--examples/quick/customitems/searchbox/images/lineedit-bg.pngbin299 -> 0 bytes
-rw-r--r--examples/quick/customitems/searchbox/main.cpp51
-rw-r--r--examples/quick/customitems/searchbox/main.qml70
-rw-r--r--examples/quick/customitems/searchbox/searchbox.pro9
-rw-r--r--examples/quick/customitems/searchbox/searchbox.qmlproject16
-rw-r--r--examples/quick/customitems/searchbox/searchbox.qrc9
-rw-r--r--examples/quick/customitems/slideswitch/content/Switch.qml127
-rw-r--r--examples/quick/customitems/slideswitch/content/background.pngbin3091 -> 0 bytes
-rw-r--r--examples/quick/customitems/slideswitch/content/background.svg23
-rw-r--r--examples/quick/customitems/slideswitch/content/knob.pngbin3101 -> 0 bytes
-rw-r--r--examples/quick/customitems/slideswitch/content/knob.svg867
-rw-r--r--examples/quick/customitems/slideswitch/doc/src/example-slideswitch.qdoc132
-rw-r--r--examples/quick/customitems/slideswitch/slideswitch.qml61
-rw-r--r--examples/quick/customitems/spinner/content/Spinner.qml80
-rw-r--r--examples/quick/customitems/spinner/content/spinner-bg.pngbin274 -> 0 bytes
-rw-r--r--examples/quick/customitems/spinner/content/spinner-select.pngbin320 -> 0 bytes
-rw-r--r--examples/quick/customitems/spinner/main.cpp51
-rw-r--r--examples/quick/customitems/spinner/main.qml71
-rw-r--r--examples/quick/customitems/spinner/spinner.pro9
-rw-r--r--examples/quick/customitems/spinner/spinner.qmlproject16
-rw-r--r--examples/quick/customitems/spinner/spinner.qrc8
-rw-r--r--examples/quick/customitems/tabwidget/TabWidget.qml112
-rw-r--r--examples/quick/customitems/tabwidget/doc/images/qml-tabwidget-example.pngbin4798 -> 0 bytes
-rw-r--r--examples/quick/customitems/tabwidget/doc/images/tab.pngbin309 -> 0 bytes
-rw-r--r--examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc42
-rw-r--r--examples/quick/customitems/tabwidget/main.cpp51
-rw-r--r--examples/quick/customitems/tabwidget/main.qml109
-rw-r--r--examples/quick/customitems/tabwidget/tabwidget.pro9
-rw-r--r--examples/quick/customitems/tabwidget/tabwidget.qmlproject16
-rw-r--r--examples/quick/customitems/tabwidget/tabwidget.qrc8
100 files changed, 465 insertions, 4118 deletions
diff --git a/examples/quick/customitems/.prev_CMakeLists.txt b/examples/quick/customitems/.prev_CMakeLists.txt
deleted file mode 100644
index 4afbfe3f6b..0000000000
--- a/examples/quick/customitems/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# Generated from customitems.pro.
-
-add_subdirectory(painteditem)
-add_subdirectory(maskedmousearea)
diff --git a/examples/quick/customitems/CMakeLists.txt b/examples/quick/customitems/CMakeLists.txt
index 4afbfe3f6b..92c5c8fe85 100644
--- a/examples/quick/customitems/CMakeLists.txt
+++ b/examples/quick/customitems/CMakeLists.txt
@@ -1,4 +1,6 @@
-# Generated from customitems.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-add_subdirectory(painteditem)
-add_subdirectory(maskedmousearea)
+qt_internal_add_example(dialcontrol)
+qt_internal_add_example(flipable)
+qt_internal_add_example(painteditem)
diff --git a/examples/quick/customitems/customitems.pro b/examples/quick/customitems/customitems.pro
index 1e0a2aed49..3199bfc9ad 100644
--- a/examples/quick/customitems/customitems.pro
+++ b/examples/quick/customitems/customitems.pro
@@ -1,14 +1,7 @@
TEMPLATE = subdirs
SUBDIRS = \
- painteditem \
- maskedmousearea
+ painteditem
EXAMPLE_FILES = \
dialcontrol \
- flipable \
- progressbar \
- scrollbar \
- searchbox \
- slideswitch \
- spinner \
- tabwidget
+ flipable
diff --git a/examples/quick/customitems/dialcontrol/CMakeLists.txt b/examples/quick/customitems/dialcontrol/CMakeLists.txt
index 9d2fa2818a..ff26205142 100644
--- a/examples/quick/customitems/dialcontrol/CMakeLists.txt
+++ b/examples/quick/customitems/dialcontrol/CMakeLists.txt
@@ -1,61 +1,53 @@
-# Generated from dialcontrol.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(dialcontrol LANGUAGES CXX)
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/dialcontrol")
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
+qt_standard_project_setup(REQUIRES 6.5)
-qt_add_executable(dialcontrol
+qt_add_executable(dialcontrolexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(dialcontrol PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(dialcontrol PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
+target_link_libraries(dialcontrolexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
-# Resources:
-set(dialcontrol_resource_files
- "content/Dial.qml"
- "content/QuitButton.qml"
- "content/background.png"
- "content/needle.png"
- "content/needle_shadow.png"
- "content/overlay.png"
- "content/quit.png"
- "dialcontrol.qml"
+qt_add_qml_module(dialcontrolexample
+ URI dialcontrol
+ QML_FILES
+ "Dial.qml"
+ "QuitButton.qml"
+ "dialcontrol.qml"
+ RESOURCES
+ "background.png"
+ "needle.png"
+ "needle_shadow.png"
+ "overlay.png"
+ "quit.png"
)
-qt6_add_resources(dialcontrol "dialcontrol"
- PREFIX
- "/"
- FILES
- ${dialcontrol_resource_files}
+install(TARGETS dialcontrolexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-install(TARGETS dialcontrol
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+qt_generate_deploy_qml_app_script(
+ TARGET dialcontrolexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/customitems/dialcontrol/Dial.qml b/examples/quick/customitems/dialcontrol/Dial.qml
new file mode 100644
index 0000000000..3b9692cc91
--- /dev/null
+++ b/examples/quick/customitems/dialcontrol/Dial.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ id: root
+ property real value : 0
+
+ width: 210; height: 210
+
+ Image { source: "background.png" }
+
+//! [needle_shadow]
+ Image {
+ x: 96
+ y: 35
+ source: "needle_shadow.png"
+ transform: Rotation {
+ origin.x: 9; origin.y: 67
+ angle: needleRotation.angle
+ }
+ }
+//! [needle_shadow]
+//! [needle]
+ Image {
+ id: needle
+ x: 98; y: 33
+ antialiasing: true
+ source: "needle.png"
+ transform: Rotation {
+ id: needleRotation
+ origin.x: 5; origin.y: 65
+ //! [needle angle]
+ angle: Math.min(Math.max(-130, root.value * 2.6 - 130), 133)
+ Behavior on angle {
+ SpringAnimation {
+ spring: 1.4
+ damping: .15
+ }
+ }
+ //! [needle angle]
+ }
+ }
+//! [needle]
+//! [overlay]
+ Image { x: 21; y: 18; source: "overlay.png" }
+//! [overlay]
+}
diff --git a/examples/quick/customitems/dialcontrol/QuitButton.qml b/examples/quick/customitems/dialcontrol/QuitButton.qml
new file mode 100644
index 0000000000..841ff34ee8
--- /dev/null
+++ b/examples/quick/customitems/dialcontrol/QuitButton.qml
@@ -0,0 +1,15 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Image {
+ source: "quit.png"
+ scale: quitMouse.pressed ? 0.8 : 1.0
+ MouseArea {
+ id: quitMouse
+ anchors.fill: parent
+ anchors.margins: -10
+ onClicked: Qt.quit()
+ }
+}
diff --git a/examples/quick/customitems/dialcontrol/content/background.png b/examples/quick/customitems/dialcontrol/background.png
index 75d555d7ab..75d555d7ab 100644
--- a/examples/quick/customitems/dialcontrol/content/background.png
+++ b/examples/quick/customitems/dialcontrol/background.png
Binary files differ
diff --git a/examples/quick/customitems/dialcontrol/content/Dial.qml b/examples/quick/customitems/dialcontrol/content/Dial.qml
deleted file mode 100644
index 108b0e7410..0000000000
--- a/examples/quick/customitems/dialcontrol/content/Dial.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-Item {
- id: root
- property real value : 0
-
- width: 210; height: 210
-
- Image { source: "background.png" }
-
-//! [needle_shadow]
- Image {
- x: 96
- y: 35
- source: "needle_shadow.png"
- transform: Rotation {
- origin.x: 9; origin.y: 67
- angle: needleRotation.angle
- }
- }
-//! [needle_shadow]
-//! [needle]
- Image {
- id: needle
- x: 98; y: 33
- antialiasing: true
- source: "needle.png"
- transform: Rotation {
- id: needleRotation
- origin.x: 5; origin.y: 65
- //! [needle angle]
- angle: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
- Behavior on angle {
- SpringAnimation {
- spring: 1.4
- damping: .15
- }
- }
- //! [needle angle]
- }
- }
-//! [needle]
-//! [overlay]
- Image { x: 21; y: 18; source: "overlay.png" }
-//! [overlay]
-}
diff --git a/examples/quick/customitems/dialcontrol/content/QuitButton.qml b/examples/quick/customitems/dialcontrol/content/QuitButton.qml
deleted file mode 100644
index 87dc159c5d..0000000000
--- a/examples/quick/customitems/dialcontrol/content/QuitButton.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-Image {
- source: "quit.png"
- scale: quitMouse.pressed ? 0.8 : 1.0
- MouseArea {
- id: quitMouse
- anchors.fill: parent
- anchors.margins: -10
- onClicked: Qt.quit()
- }
-}
diff --git a/examples/quick/customitems/dialcontrol/dialcontrol.qml b/examples/quick/customitems/dialcontrol/dialcontrol.qml
index d0a623a72a..695ec9fb46 100644
--- a/examples/quick/customitems/dialcontrol/dialcontrol.qml
+++ b/examples/quick/customitems/dialcontrol/dialcontrol.qml
@@ -1,57 +1,9 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [imports]
-import QtQuick 2.2
-import QtQuick.Window 2.1
-import "content"
+import QtQuick
+import QtQuick.Window
//! [imports]
//! [0]
@@ -91,7 +43,7 @@ Rectangle {
return
}
- var desiredPercent = slider.x * 100 / (oldWidth - 32)
+ let desiredPercent = slider.x * 100 / (oldWidth - 32)
slider.x = desiredPercent * (width - 32) / 100
oldWidth = width
}
diff --git a/examples/quick/customitems/dialcontrol/dialcontrol.qrc b/examples/quick/customitems/dialcontrol/dialcontrol.qrc
index 6433d68bb8..c3c8d58b66 100644
--- a/examples/quick/customitems/dialcontrol/dialcontrol.qrc
+++ b/examples/quick/customitems/dialcontrol/dialcontrol.qrc
@@ -1,12 +1,12 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/dialcontrol">
+ <file>Dial.qml</file>
+ <file>QuitButton.qml</file>
+ <file>background.png</file>
<file>dialcontrol.qml</file>
- <file>content/background.png</file>
- <file>content/Dial.qml</file>
- <file>content/needle_shadow.png</file>
- <file>content/needle.png</file>
- <file>content/overlay.png</file>
- <file>content/quit.png</file>
- <file>content/QuitButton.qml</file>
+ <file>needle.png</file>
+ <file>needle_shadow.png</file>
+ <file>overlay.png</file>
+ <file>quit.png</file>
</qresource>
</RCC>
diff --git a/examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc b/examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc
index cd50650c0b..7b56478c37 100644
--- a/examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc
+++ b/examples/quick/customitems/dialcontrol/doc/src/dialcontrol.qdoc
@@ -1,35 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title UI Components: Dial Control Example
\example customitems/dialcontrol
\brief The Dial Control Example shows how to create a speedometer-type dial.
+ \examplecategory {User Interface Components}
This example shows how to create a dial-type control. It combines
\l Image elements with \l Rotation transforms and \l SpringAnimation behaviors
diff --git a/examples/quick/customitems/dialcontrol/main.cpp b/examples/quick/customitems/dialcontrol/main.cpp
index 6ebe203a70..56b1d789e7 100644
--- a/examples/quick/customitems/dialcontrol/main.cpp
+++ b/examples/quick/customitems/dialcontrol/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dialcontrol)
+DECLARATIVE_EXAMPLE_MAIN(dialcontrol/dialcontrol)
diff --git a/examples/quick/customitems/dialcontrol/content/needle.png b/examples/quick/customitems/dialcontrol/needle.png
index 2d19f75039..2d19f75039 100644
--- a/examples/quick/customitems/dialcontrol/content/needle.png
+++ b/examples/quick/customitems/dialcontrol/needle.png
Binary files differ
diff --git a/examples/quick/customitems/dialcontrol/content/needle_shadow.png b/examples/quick/customitems/dialcontrol/needle_shadow.png
index 8d8a928cc5..8d8a928cc5 100644
--- a/examples/quick/customitems/dialcontrol/content/needle_shadow.png
+++ b/examples/quick/customitems/dialcontrol/needle_shadow.png
Binary files differ
diff --git a/examples/quick/customitems/dialcontrol/content/overlay.png b/examples/quick/customitems/dialcontrol/overlay.png
index 3860a7b590..3860a7b590 100644
--- a/examples/quick/customitems/dialcontrol/content/overlay.png
+++ b/examples/quick/customitems/dialcontrol/overlay.png
Binary files differ
diff --git a/examples/quick/customitems/dialcontrol/content/quit.png b/examples/quick/customitems/dialcontrol/quit.png
index b822057d4e..b822057d4e 100644
--- a/examples/quick/customitems/dialcontrol/content/quit.png
+++ b/examples/quick/customitems/dialcontrol/quit.png
Binary files differ
diff --git a/examples/quick/customitems/flipable/content/5_heart.png b/examples/quick/customitems/flipable/5_heart.png
index fb59d81453..fb59d81453 100644
--- a/examples/quick/customitems/flipable/content/5_heart.png
+++ b/examples/quick/customitems/flipable/5_heart.png
Binary files differ
diff --git a/examples/quick/customitems/flipable/content/9_club.png b/examples/quick/customitems/flipable/9_club.png
index 2545001904..2545001904 100644
--- a/examples/quick/customitems/flipable/content/9_club.png
+++ b/examples/quick/customitems/flipable/9_club.png
Binary files differ
diff --git a/examples/quick/customitems/flipable/CMakeLists.txt b/examples/quick/customitems/flipable/CMakeLists.txt
new file mode 100644
index 0000000000..8d1c7ab7cf
--- /dev/null
+++ b/examples/quick/customitems/flipable/CMakeLists.txt
@@ -0,0 +1,51 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+
+project(flipable LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(flipableexample
+ WIN32
+ MACOSX_BUNDLE
+ main.cpp
+)
+
+target_link_libraries(flipableexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+qt_add_qml_module(flipableexample
+ URI flipable
+ QML_FILES
+ "flipable.qml"
+ "Card.qml"
+ RESOURCES
+ "5_heart.png"
+ "9_club.png"
+ "back.png"
+)
+
+install(TARGETS flipableexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+qt_generate_deploy_qml_app_script(
+ TARGET flipableexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
+)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/customitems/flipable/Card.qml b/examples/quick/customitems/flipable/Card.qml
new file mode 100644
index 0000000000..0a1e4059f7
--- /dev/null
+++ b/examples/quick/customitems/flipable/Card.qml
@@ -0,0 +1,43 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Flipable {
+ id: container
+
+ property alias source: frontImage.source
+ property bool flipped: true
+ property int xAxis: 0
+ property int yAxis: 0
+ property int angle: 0
+
+ width: front.width; height: front.height
+
+ front: Image { id: frontImage }
+ back: Image { source: "back.png" }
+
+ state: "back"
+
+ MouseArea { anchors.fill: parent; onClicked: container.flipped = !container.flipped }
+
+ transform: Rotation {
+ id: rotation; origin.x: container.width / 2; origin.y: container.height / 2
+ axis.x: container.xAxis; axis.y: container.yAxis; axis.z: 0
+ }
+
+ states: State {
+ name: "back"; when: container.flipped
+ PropertyChanges { rotation.angle: container.angle }
+ }
+
+ transitions: Transition {
+ ParallelAnimation {
+ NumberAnimation { target: rotation; properties: "angle"; duration: 600 }
+ SequentialAnimation {
+ NumberAnimation { target: container; property: "scale"; to: 0.75; duration: 300 }
+ NumberAnimation { target: container; property: "scale"; to: 1.0; duration: 300 }
+ }
+ }
+ }
+}
diff --git a/examples/quick/customitems/flipable/content/back.png b/examples/quick/customitems/flipable/back.png
index f715d7487e..f715d7487e 100644
--- a/examples/quick/customitems/flipable/content/back.png
+++ b/examples/quick/customitems/flipable/back.png
Binary files differ
diff --git a/examples/quick/customitems/flipable/content/Card.qml b/examples/quick/customitems/flipable/content/Card.qml
deleted file mode 100644
index ffffdb6b7d..0000000000
--- a/examples/quick/customitems/flipable/content/Card.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-Flipable {
- id: container
-
- property alias source: frontImage.source
- property bool flipped: true
- property int xAxis: 0
- property int yAxis: 0
- property int angle: 0
-
- width: front.width; height: front.height
-
- front: Image { id: frontImage }
- back: Image { source: "back.png" }
-
- state: "back"
-
- MouseArea { anchors.fill: parent; onClicked: container.flipped = !container.flipped }
-
- transform: Rotation {
- id: rotation; origin.x: container.width / 2; origin.y: container.height / 2
- axis.x: container.xAxis; axis.y: container.yAxis; axis.z: 0
- }
-
- states: State {
- name: "back"; when: container.flipped
- PropertyChanges { target: rotation; angle: container.angle }
- }
-
- transitions: Transition {
- ParallelAnimation {
- NumberAnimation { target: rotation; properties: "angle"; duration: 600 }
- SequentialAnimation {
- NumberAnimation { target: container; property: "scale"; to: 0.75; duration: 300 }
- NumberAnimation { target: container; property: "scale"; to: 1.0; duration: 300 }
- }
- }
- }
-}
diff --git a/examples/quick/customitems/flipable/doc/src/flipable.qdoc b/examples/quick/customitems/flipable/doc/src/flipable.qdoc
index 58f5492251..8b2eea6611 100644
--- a/examples/quick/customitems/flipable/doc/src/flipable.qdoc
+++ b/examples/quick/customitems/flipable/doc/src/flipable.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title UI Components: Flipable Example
\example customitems/flipable
\brief The Flipable Example shows an item that flips whenever clicked, rotating around the y-axis.
+ \examplecategory {User Interface Components}
This example shows how to use the \l Flipable element.
diff --git a/examples/quick/customitems/flipable/flipable.qml b/examples/quick/customitems/flipable/flipable.qml
index 3662898864..3d95afe75e 100644
--- a/examples/quick/customitems/flipable/flipable.qml
+++ b/examples/quick/customitems/flipable/flipable.qml
@@ -1,55 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "content"
+import QtQuick
Rectangle {
id: window
@@ -59,7 +11,7 @@ Rectangle {
Row {
anchors.centerIn: parent; spacing: 30
- Card { source: "content/9_club.png"; angle: 180; yAxis: 1 }
- Card { source: "content/5_heart.png"; angle: 540; xAxis: 1 }
+ Card { source: "9_club.png"; angle: 180; yAxis: 1 }
+ Card { source: "5_heart.png"; angle: 540; xAxis: 1 }
}
}
diff --git a/examples/quick/customitems/flipable/flipable.qrc b/examples/quick/customitems/flipable/flipable.qrc
index 7918ccf00e..a8056e45f9 100644
--- a/examples/quick/customitems/flipable/flipable.qrc
+++ b/examples/quick/customitems/flipable/flipable.qrc
@@ -1,9 +1,9 @@
<RCC>
- <qresource prefix="/">
+ <qresource prefix="/qt/qml/flipable">
<file>flipable.qml</file>
- <file>content/5_heart.png</file>
- <file>content/9_club.png</file>
- <file>content/back.png</file>
- <file>content/Card.qml</file>
+ <file>5_heart.png</file>
+ <file>9_club.png</file>
+ <file>back.png</file>
+ <file>Card.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/customitems/flipable/main.cpp b/examples/quick/customitems/flipable/main.cpp
index a0f0d67d45..c94af94422 100644
--- a/examples/quick/customitems/flipable/main.cpp
+++ b/examples/quick/customitems/flipable/main.cpp
@@ -1,51 +1,4 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(flipable)
+DECLARATIVE_EXAMPLE_MAIN(flipable/flipable)
diff --git a/examples/quick/customitems/maskedmousearea/CMakeLists.txt b/examples/quick/customitems/maskedmousearea/CMakeLists.txt
deleted file mode 100644
index 0c5a19b5e7..0000000000
--- a/examples/quick/customitems/maskedmousearea/CMakeLists.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-# Generated from maskedmousearea.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(maskedmousearea LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/maskedmousearea")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-qt_add_executable(maskedmousearea
- main.cpp
- maskedmousearea.cpp maskedmousearea.h
-)
-set_target_properties(maskedmousearea PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(maskedmousearea PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(maskedmousearea_resource_files
- "images/cloud_1.png"
- "images/cloud_2.png"
- "images/moon.png"
- "maskedmousearea.qml"
-)
-
-qt6_add_resources(maskedmousearea "maskedmousearea"
- PREFIX
- "/customitems/maskedmousearea"
- FILES
- ${maskedmousearea_resource_files}
-)
-
-install(TARGETS maskedmousearea
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
-
-set_target_properties(maskedmousearea PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI Example
-)
-
-qt6_qml_type_registration(maskedmousearea)
diff --git a/examples/quick/customitems/maskedmousearea/images/cloud_1.png b/examples/quick/customitems/maskedmousearea/images/cloud_1.png
deleted file mode 100644
index 9beb7e8442..0000000000
--- a/examples/quick/customitems/maskedmousearea/images/cloud_1.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/maskedmousearea/images/cloud_2.png b/examples/quick/customitems/maskedmousearea/images/cloud_2.png
deleted file mode 100644
index 981bbd2630..0000000000
--- a/examples/quick/customitems/maskedmousearea/images/cloud_2.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/maskedmousearea/images/moon.png b/examples/quick/customitems/maskedmousearea/images/moon.png
deleted file mode 100644
index 0a8037dd85..0000000000
--- a/examples/quick/customitems/maskedmousearea/images/moon.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/maskedmousearea/main.cpp b/examples/quick/customitems/maskedmousearea/main.cpp
deleted file mode 100644
index 5b42516154..0000000000
--- a/examples/quick/customitems/maskedmousearea/main.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-
-#include <QGuiApplication>
-#include <QQuickView>
-
-#include "maskedmousearea.h"
-
-int main(int argc, char* argv[])
-{
- QGuiApplication app(argc,argv);
- QQuickView view;
-
- view.setSource(QUrl("qrc:///customitems/maskedmousearea/maskedmousearea.qml"));
- view.show();
- return app.exec();
-}
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.cpp b/examples/quick/customitems/maskedmousearea/maskedmousearea.cpp
deleted file mode 100644
index 55fce54ac0..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-
-#include "maskedmousearea.h"
-
-#include <QStyleHints>
-#include <QGuiApplication>
-#include <qqmlfile.h>
-
-MaskedMouseArea::MaskedMouseArea(QQuickItem *parent)
- : QQuickItem(parent),
- m_pressed(false),
- m_alphaThreshold(0.0),
- m_containsMouse(false)
-{
- setAcceptHoverEvents(true);
- setAcceptedMouseButtons(Qt::LeftButton);
-}
-
-void MaskedMouseArea::setPressed(bool pressed)
-{
- if (m_pressed != pressed) {
- m_pressed = pressed;
- emit pressedChanged();
- }
-}
-
-void MaskedMouseArea::setContainsMouse(bool containsMouse)
-{
- if (m_containsMouse != containsMouse) {
- m_containsMouse = containsMouse;
- emit containsMouseChanged();
- }
-}
-
-void MaskedMouseArea::setMaskSource(const QUrl &source)
-{
- if (m_maskSource != source) {
- m_maskSource = source;
- m_maskImage = QImage(QQmlFile::urlToLocalFileOrQrc(source));
- emit maskSourceChanged();
- }
-}
-
-void MaskedMouseArea::setAlphaThreshold(qreal threshold)
-{
- if (m_alphaThreshold != threshold) {
- m_alphaThreshold = threshold;
- emit alphaThresholdChanged();
- }
-}
-
-bool MaskedMouseArea::contains(const QPointF &point) const
-{
- if (!QQuickItem::contains(point) || m_maskImage.isNull())
- return false;
-
- QPoint p = point.toPoint();
-
- if (p.x() < 0 || p.x() >= m_maskImage.width() ||
- p.y() < 0 || p.y() >= m_maskImage.height())
- return false;
-
- qreal r = qBound<int>(0, m_alphaThreshold * 255, 255);
- return qAlpha(m_maskImage.pixel(p)) > r;
-}
-
-void MaskedMouseArea::mousePressEvent(QMouseEvent *event)
-{
- setPressed(true);
- m_pressPoint = event->position().toPoint();
- emit pressed();
-}
-
-void MaskedMouseArea::mouseReleaseEvent(QMouseEvent *event)
-{
- setPressed(false);
- emit released();
-
- const int threshold = qApp->styleHints()->startDragDistance();
- const bool isClick = (threshold >= qAbs(event->position().toPoint().x() - m_pressPoint.x()) &&
- threshold >= qAbs(event->position().toPoint().y() - m_pressPoint.y()));
-
- if (isClick)
- emit clicked();
-}
-
-void MaskedMouseArea::mouseUngrabEvent()
-{
- setPressed(false);
- emit canceled();
-}
-
-void MaskedMouseArea::hoverEnterEvent(QHoverEvent *event)
-{
- Q_UNUSED(event);
- setContainsMouse(true);
-}
-
-void MaskedMouseArea::hoverLeaveEvent(QHoverEvent *event)
-{
- Q_UNUSED(event);
- setContainsMouse(false);
-}
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.h b/examples/quick/customitems/maskedmousearea/maskedmousearea.h
deleted file mode 100644
index 39d78a019a..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-
-#ifndef MASKEDMOUSEAREA_H
-#define MASKEDMOUSEAREA_H
-
-#include <QImage>
-#include <QQuickItem>
-
-
-class MaskedMouseArea : public QQuickItem
-{
- Q_OBJECT
- Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged)
- Q_PROPERTY(bool containsMouse READ containsMouse NOTIFY containsMouseChanged)
- Q_PROPERTY(QUrl maskSource READ maskSource WRITE setMaskSource NOTIFY maskSourceChanged)
- Q_PROPERTY(qreal alphaThreshold READ alphaThreshold WRITE setAlphaThreshold NOTIFY alphaThresholdChanged)
- QML_ELEMENT
-
-public:
- MaskedMouseArea(QQuickItem *parent = 0);
-
- bool contains(const QPointF &point) const;
-
- bool isPressed() const { return m_pressed; }
- bool containsMouse() const { return m_containsMouse; }
-
- QUrl maskSource() const { return m_maskSource; }
- void setMaskSource(const QUrl &source);
-
- qreal alphaThreshold() const { return m_alphaThreshold; }
- void setAlphaThreshold(qreal threshold);
-
-signals:
- void pressed();
- void released();
- void clicked();
- void canceled();
- void pressedChanged();
- void maskSourceChanged();
- void containsMouseChanged();
- void alphaThresholdChanged();
-
-protected:
- void setPressed(bool pressed);
- void setContainsMouse(bool containsMouse);
- void mousePressEvent(QMouseEvent *event);
- void mouseReleaseEvent(QMouseEvent *event);
- void hoverEnterEvent(QHoverEvent *event);
- void hoverLeaveEvent(QHoverEvent *event);
- void mouseUngrabEvent();
-
-private:
- bool m_pressed;
- QUrl m_maskSource;
- QImage m_maskImage;
- QPointF m_pressPoint;
- qreal m_alphaThreshold;
- bool m_containsMouse;
-};
-
-#endif
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.pro b/examples/quick/customitems/maskedmousearea/maskedmousearea.pro
deleted file mode 100644
index c5cedf4e6e..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-
-CONFIG += qmltypes
-QML_IMPORT_NAME = Example
-QML_IMPORT_MAJOR_VERSION = 1
-
-HEADERS += maskedmousearea.h
-
-SOURCES += main.cpp \
- maskedmousearea.cpp
-
-RESOURCES += maskedmousearea.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/maskedmousearea
-INSTALLS += target
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.qml b/examples/quick/customitems/maskedmousearea/maskedmousearea.qml
deleted file mode 100644
index 2474edaf78..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.qml
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-import Example 1.0
-
-Rectangle {
- height: 480
- width: 320
- color: "black"
-
- Text {
- text: qsTr("CLICK AND HOVER")
- opacity: 0.6
- color: "white"
- font.pixelSize: 20
- anchors.top: parent.top
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.topMargin: 50
- }
-
- Image {
- id: moon
- anchors.centerIn: parent
- scale: moonArea.pressed ? 1.1 : 1.0
- opacity: moonArea.containsMouse ? 1.0 : 0.7
- source: Qt.resolvedUrl("images/moon.png")
-
- MaskedMouseArea {
- id: moonArea
- anchors.fill: parent
- alphaThreshold: 0.4
- maskSource: moon.source
- }
-
- Behavior on opacity {
- NumberAnimation { duration: 200 }
- }
- Behavior on scale {
- NumberAnimation { duration: 100 }
- }
- }
-
- Image {
- id: rightCloud
- anchors {
- centerIn: moon
- verticalCenterOffset: 30
- horizontalCenterOffset: 80
- }
- scale: rightCloudArea.pressed ? 1.1 : 1.0
- opacity: rightCloudArea.containsMouse ? 1.0 : 0.7
- source: Qt.resolvedUrl("images/cloud_2.png")
-
- MaskedMouseArea {
- id: rightCloudArea
- anchors.fill: parent
- alphaThreshold: 0.4
- maskSource: rightCloud.source
- }
-
- Behavior on opacity {
- NumberAnimation { duration: 200 }
- }
- Behavior on scale {
- NumberAnimation { duration: 100 }
- }
- }
-
- Image {
- id: leftCloud
- anchors {
- centerIn: moon
- verticalCenterOffset: 40
- horizontalCenterOffset: -80
- }
- scale: leftCloudArea.pressed ? 1.1 : 1.0
- opacity: leftCloudArea.containsMouse ? 1.0 : 0.7
- source: Qt.resolvedUrl("images/cloud_1.png")
-
- MaskedMouseArea {
- id: leftCloudArea
- anchors.fill: parent
- alphaThreshold: 0.4
- maskSource: leftCloud.source
- }
-
- Behavior on opacity {
- NumberAnimation { duration: 200 }
- }
- Behavior on scale {
- NumberAnimation { duration: 100 }
- }
- }
-}
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.qmlproject b/examples/quick/customitems/maskedmousearea/maskedmousearea.qmlproject
deleted file mode 100644
index 709c19866f..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "maskedmousearea.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/maskedmousearea/maskedmousearea.qrc b/examples/quick/customitems/maskedmousearea/maskedmousearea.qrc
deleted file mode 100644
index 3cc3955e56..0000000000
--- a/examples/quick/customitems/maskedmousearea/maskedmousearea.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/customitems/maskedmousearea">
- <file>maskedmousearea.qml</file>
- <file>images/cloud_1.png</file>
- <file>images/cloud_2.png</file>
- <file>images/moon.png</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/customitems/painteditem/CMakeLists.txt b/examples/quick/customitems/painteditem/CMakeLists.txt
index 533396a7cd..ca23161b1c 100644
--- a/examples/quick/customitems/painteditem/CMakeLists.txt
+++ b/examples/quick/customitems/painteditem/CMakeLists.txt
@@ -1,70 +1,46 @@
-# Generated from painteditem.pro.
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-cmake_minimum_required(VERSION 3.14)
-project(qmltextballoonplugin LANGUAGES CXX)
+cmake_minimum_required(VERSION 3.16)
+project(painteditem LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/customitems/painteditem/TextBalloonPlugin")
+qt_standard_project_setup(REQUIRES 6.5)
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Qml)
-find_package(Qt6 COMPONENTS Quick)
+add_subdirectory(TextBalloon)
-qt6_add_qml_module(qmltextballoonplugin
- OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/TextBalloonPlugin"
- VERSION 1.0
- URI "TextBalloonPlugin"
- INSTALL_LOCATION ${INSTALL_EXAMPLEDIR}
-)
+qt_add_executable(painteditemexample WIN32 MACOSX_BUNDLE main.cpp)
-target_sources(qmltextballoonplugin PRIVATE
- TextBalloonPlugin/plugin.h
- textballoon.cpp textballoon.h
-)
-set_target_properties(qmltextballoonplugin PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(qmltextballoonplugin PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+qt_add_qml_module(painteditemexample
+ URI painteditem
+ QML_FILES
+ "textballoons.qml"
)
-
-# Resources:
-set(painteditem_resource_files
- "textballoon.h"
- "textballoons.qml"
+target_link_libraries(painteditemexample PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
-qt6_add_resources(qmltextballoonplugin "painteditem"
- PREFIX
- "/painteditem"
- FILES
- ${painteditem_resource_files}
-)
+add_dependencies(painteditemexample qmltextballoon)
-install(TARGETS qmltextballoonplugin
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+install(TARGETS painteditemexample
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
-set_target_properties(qmltextballoonplugin PROPERTIES
- QT_QML_MODULE_VERSION 1.0
- QT_QML_MODULE_URI TextBalloonPlugin
+qt_generate_deploy_qml_app_script(
+ TARGET painteditemexample
+ OUTPUT_SCRIPT deploy_script
+ MACOS_BUNDLE_POST_BUILD
+ NO_UNSUPPORTED_PLATFORM_ERROR
+ DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
)
-
-qt6_qml_type_registration(qmltextballoonplugin)
+install(SCRIPT ${deploy_script})
diff --git a/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt b/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt
new file mode 100644
index 0000000000..b94b297aeb
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ message(FATAL_ERROR "TextBalloon should be built as part of the 'painteditem' project, and not in isolation.")
+endif()
+
+qt_add_qml_module(qmltextballoon
+ URI "TextBalloon"
+ PLUGIN_TARGET qmltextballoon
+ SOURCES
+ textballoon.cpp textballoon.h
+)
+
+target_link_libraries(qmltextballoon PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+)
+
+install(TARGETS qmltextballoon
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/TextBalloon"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_BINDIR}/TextBalloon"
+)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
+ DESTINATION "${CMAKE_INSTALL_BINDIR}/TextBalloon"
+)
diff --git a/examples/quick/customitems/painteditem/TextBalloon/plugin.h b/examples/quick/customitems/painteditem/TextBalloon/plugin.h
new file mode 100644
index 0000000000..e598501b7e
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/plugin.h
@@ -0,0 +1,12 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QQmlEngineExtensionPlugin>
+
+#include "textballoon.h"
+
+class TextBalloonPlugin : public QQmlEngineExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
+};
diff --git a/examples/quick/customitems/painteditem/TextBalloonPlugin/qmldir b/examples/quick/customitems/painteditem/TextBalloon/qmldir
index e8a08ae9d3..3b72e9a44d 100644
--- a/examples/quick/customitems/painteditem/TextBalloonPlugin/qmldir
+++ b/examples/quick/customitems/painteditem/TextBalloon/qmldir
@@ -1 +1,2 @@
+module TextBalloon
plugin qmltextballoonplugin
diff --git a/examples/quick/customitems/painteditem/TextBalloon/textballoon.cpp b/examples/quick/customitems/painteditem/TextBalloon/textballoon.cpp
new file mode 100644
index 0000000000..e7fe911147
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/textballoon.cpp
@@ -0,0 +1,56 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "textballoon.h"
+#include <QPainter>
+
+//! [0]
+TextBalloon::TextBalloon(QQuickItem *parent)
+ : QQuickPaintedItem(parent)
+ , rightAligned(false)
+{
+}
+//! [0]
+
+//! [1]
+void TextBalloon::paint(QPainter *painter)
+{
+ QBrush brush(QColor("#007430"));
+
+ painter->setBrush(brush);
+ painter->setPen(Qt::NoPen);
+ painter->setRenderHint(QPainter::Antialiasing);
+
+ QSizeF itemSize = size();
+ painter->drawRoundedRect(0, 0, itemSize.width(), itemSize.height() - 10, 10, 10);
+
+ if (rightAligned)
+ {
+ const QPointF points[3] = {
+ QPointF(itemSize.width() - 10.0, itemSize.height() - 10.0),
+ QPointF(itemSize.width() - 20.0, itemSize.height()),
+ QPointF(itemSize.width() - 30.0, itemSize.height() - 10.0),
+ };
+ painter->drawConvexPolygon(points, 3);
+ }
+ else
+ {
+ const QPointF points[3] = {
+ QPointF(10.0, itemSize.height() - 10.0),
+ QPointF(20.0, itemSize.height()),
+ QPointF(30.0, itemSize.height() - 10.0),
+ };
+ painter->drawConvexPolygon(points, 3);
+ }
+}
+//! [1]
+
+bool TextBalloon::isRightAligned() const
+{
+ return this->rightAligned;
+}
+
+void TextBalloon::setRightAligned(bool rightAligned)
+{
+ this->rightAligned = rightAligned;
+}
diff --git a/examples/quick/customitems/painteditem/TextBalloon/textballoon.h b/examples/quick/customitems/painteditem/TextBalloon/textballoon.h
new file mode 100644
index 0000000000..a52db11ce7
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/textballoon.h
@@ -0,0 +1,31 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef TEXTBALLOON_H
+#define TEXTBALLOON_H
+
+#include <QtQuick>
+
+//! [0]
+class TextBalloon : public QQuickPaintedItem
+{
+ Q_OBJECT
+ Q_PROPERTY(bool rightAligned READ isRightAligned WRITE setRightAligned NOTIFY rightAlignedChanged)
+ QML_ELEMENT
+
+ public:
+ TextBalloon(QQuickItem *parent = nullptr);
+ void paint(QPainter *painter) override;
+
+ bool isRightAligned() const;
+ void setRightAligned(bool rightAligned);
+
+ private:
+ bool rightAligned;
+
+ signals:
+ void rightAlignedChanged();
+};
+//! [0]
+
+#endif
diff --git a/examples/quick/customitems/painteditem/TextBalloon/textballoon.pro b/examples/quick/customitems/painteditem/TextBalloon/textballoon.pro
new file mode 100644
index 0000000000..7f7662b451
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/textballoon.pro
@@ -0,0 +1,28 @@
+TEMPLATE = lib
+CONFIG += plugin qmltypes
+QT += qml quick
+
+QML_IMPORT_NAME = TextBalloon
+QML_IMPORT_MAJOR_VERSION = 1
+
+TARGET = qmltextballoonplugin
+
+HEADERS += \
+ plugin.h \
+ textballoon.h
+
+SOURCES += textballoon.cpp
+
+RESOURCES += textballoon.qrc
+
+qmldir_output.files = qmldir
+qmldir_output.path = $$OUT_PWD
+COPIES += qmldir_output
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME
+qmldir_install.files = qmldir
+qmldir_install.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME
+
+INSTALLS += qmldir_install target
+
+CONFIG += install_ok # Do not cargo-cult this!
diff --git a/examples/quick/customitems/painteditem/TextBalloon/textballoon.qrc b/examples/quick/customitems/painteditem/TextBalloon/textballoon.qrc
new file mode 100644
index 0000000000..42c42bd0a6
--- /dev/null
+++ b/examples/quick/customitems/painteditem/TextBalloon/textballoon.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/TextBalloon">
+ <file>qmldir</file>
+ </qresource>
+</RCC>
diff --git a/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h b/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h
deleted file mode 100644
index 4abf2cf3dc..0000000000
--- a/examples/quick/customitems/painteditem/TextBalloonPlugin/plugin.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications 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$
-**
-****************************************************************************/
-
-#include <QQmlEngineExtensionPlugin>
-
-#include "../textballoon.h"
-
-class TextBalloonPlugin : public QQmlEngineExtensionPlugin
-{
- Q_OBJECT
- Q_PLUGIN_METADATA(IID QQmlEngineExtensionInterface_iid)
-};
diff --git a/examples/quick/customitems/painteditem/doc/src/textballoons.qdoc b/examples/quick/customitems/painteditem/doc/src/textballoons.qdoc
index 4541ba0bd9..a0194759bd 100644
--- a/examples/quick/customitems/painteditem/doc/src/textballoons.qdoc
+++ b/examples/quick/customitems/painteditem/doc/src/textballoons.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\title Scene Graph - Painted Item
\brief Shows how to implement QPainter-based custom scenegraph items.
\example customitems/painteditem
\ingroup qtquickexamples
+ \examplecategory {Graphics}
The Painted Item example shows how to use the QML Scene Graph framework to
implement custom scenegraph items using QPainter.
@@ -38,16 +15,14 @@
The QQuickPaintedItem class is a class derived from QQuickItem for implementing
custom QML Scene Graph items using the QPainter interfaces.
- The example consists of an item class, a plugin class and a QML file
- to use this plugin. The \c TextBalloon class represents the individual
- text balloons extending QQuickPaintedItem, the \c TextBalloonPlugin class
- represents the skeleton code for a \l {Qt Quick} plugin and the
- \c textballoons.qml file is used to load the plugin and display the text
- balloons.
+ The example consists of an item class and a QML file to use the item. The
+ \c TextBalloon class represents the individual text balloons extending
+ QQuickPaintedItem and the \c textballoons.qml file is used to load the module
+ containing the TextBalloon QML type and display the text balloons.
We will focus on the \c TextBalloon class first and continue with the
- \c textballoons.qml file. For an example on how to implement a \l {Qt Quick}
- plugin please look at \l{Chapter 6: Writing an Extension Plugin}
+ \c textballoons.qml file. For an example on how to implement a plugin for a
+ QML module please look at \l{Chapter 6: Writing an Extension Plugin}
{Writing an Extension Plugin}
\section1 TextBalloon Class Declaration
@@ -56,7 +31,7 @@
is the base class for all QPainter based items in the QML Scene Graph
framework.
- \snippet customitems/painteditem/textballoon.h 0
+ \snippet customitems/painteditem/TextBalloon/textballoon.h 0
To implement a QQuickPaintedItem you must implement QQuickPaintedIem's pure
virtual function \l {QQuickPaintedItem::}{paint()} which implements the
@@ -67,13 +42,13 @@
We have to be sure to initialize the rightAligned property for a
TextBalloon item.
- \snippet customitems/painteditem/textballoon.cpp 0
+ \snippet customitems/painteditem/TextBalloon/textballoon.cpp 0
Then we implement the \c paint() function which is automatically called by
the Scene Graph framework to paint the contents of the item. The function
paints the item in local coordinates.
- \snippet customitems/painteditem/textballoon.cpp 1
+ \snippet customitems/painteditem/TextBalloon/textballoon.cpp 1
We start with setting the pen and brush on the item to define the look of
the item. After that we start drawing. Note that the \l {QQuickPaintedItem::}{contentsBoundingRect()}
@@ -81,7 +56,7 @@
returned by the \l {QQuickPaintedItem::}{contentsBoundingRect()} function is the size
of the item as defined in the QML file.
- \section1 Textballoons.qml File
+ \section1 textballoons.qml File
The Interface consists of two main parts. The scrollable area with the
textballoons and the controls button to add new balloons.
diff --git a/examples/quick/customitems/painteditem/main.cpp b/examples/quick/customitems/painteditem/main.cpp
new file mode 100644
index 0000000000..698db7e67c
--- /dev/null
+++ b/examples/quick/customitems/painteditem/main.cpp
@@ -0,0 +1,4 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(painteditem/textballoons)
diff --git a/examples/quick/customitems/painteditem/painteditem.pro b/examples/quick/customitems/painteditem/painteditem.pro
index 641833f3aa..7c26304b26 100644
--- a/examples/quick/customitems/painteditem/painteditem.pro
+++ b/examples/quick/customitems/painteditem/painteditem.pro
@@ -1,29 +1,2 @@
-TEMPLATE = lib
-CONFIG += plugin qmltypes
-QT += qml quick
-
-QML_IMPORT_NAME = TextBalloonPlugin
-QML_IMPORT_MAJOR_VERSION = 1
-
-TARGET = qmltextballoonplugin
-
-HEADERS += \
- TextBalloonPlugin/plugin.h \
- textballoon.h
-
-SOURCES += textballoon.cpp
-
-RESOURCES += painteditem.qrc
-
-DESTDIR = $$QML_IMPORT_NAME
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME
-qmldir.files = $$QML_IMPORT_NAME/qmldir
-qmldir.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem/$$QML_IMPORT_NAME
-
-INSTALLS += qmldir target
-
-CONFIG += install_ok # Do not cargo-cult this!
-
-OTHER_FILES += \
- textballoons.qml
+TEMPLATE = subdirs
+SUBDIRS = TextBalloon/textballoon.pro textballoonuser.pro
diff --git a/examples/quick/customitems/painteditem/painteditem.qrc b/examples/quick/customitems/painteditem/painteditem.qrc
index c240be02a1..95305efaca 100644
--- a/examples/quick/customitems/painteditem/painteditem.qrc
+++ b/examples/quick/customitems/painteditem/painteditem.qrc
@@ -1,6 +1,5 @@
<RCC>
- <qresource prefix="/painteditem">
- <file>textballoon.h</file>
+ <qresource prefix="/qt/qml/painteditem">
<file>textballoons.qml</file>
</qresource>
</RCC>
diff --git a/examples/quick/customitems/painteditem/textballoon.cpp b/examples/quick/customitems/painteditem/textballoon.cpp
deleted file mode 100644
index de34d67103..0000000000
--- a/examples/quick/customitems/painteditem/textballoon.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications 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$
-**
-****************************************************************************/
-
-#include "textballoon.h"
-#include <QPainter>
-
-//! [0]
-TextBalloon::TextBalloon(QQuickItem *parent)
- : QQuickPaintedItem(parent)
- , rightAligned(false)
-{
-}
-//! [0]
-
-//! [1]
-void TextBalloon::paint(QPainter *painter)
-{
- QBrush brush(QColor("#007430"));
-
- painter->setBrush(brush);
- painter->setPen(Qt::NoPen);
- painter->setRenderHint(QPainter::Antialiasing);
-
- QSizeF itemSize = size();
- painter->drawRoundedRect(0, 0, itemSize.width(), itemSize.height() - 10, 10, 10);
-
- if (rightAligned)
- {
- const QPointF points[3] = {
- QPointF(itemSize.width() - 10.0, itemSize.height() - 10.0),
- QPointF(itemSize.width() - 20.0, itemSize.height()),
- QPointF(itemSize.width() - 30.0, itemSize.height() - 10.0),
- };
- painter->drawConvexPolygon(points, 3);
- }
- else
- {
- const QPointF points[3] = {
- QPointF(10.0, itemSize.height() - 10.0),
- QPointF(20.0, itemSize.height()),
- QPointF(30.0, itemSize.height() - 10.0),
- };
- painter->drawConvexPolygon(points, 3);
- }
-}
-//! [1]
-
-bool TextBalloon::isRightAligned()
-{
- return this->rightAligned;
-}
-
-void TextBalloon::setRightAligned(bool rightAligned)
-{
- this->rightAligned = rightAligned;
-}
diff --git a/examples/quick/customitems/painteditem/textballoon.h b/examples/quick/customitems/painteditem/textballoon.h
deleted file mode 100644
index eb72804602..0000000000
--- a/examples/quick/customitems/painteditem/textballoon.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications 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$
-**
-****************************************************************************/
-
-#ifndef TEXTBALLOON_H
-#define TEXTBALLOON_H
-
-#include <QtQuick>
-
-//! [0]
-class TextBalloon : public QQuickPaintedItem
-{
- Q_OBJECT
- Q_PROPERTY(bool rightAligned READ isRightAligned WRITE setRightAligned NOTIFY rightAlignedChanged)
- QML_ELEMENT
-
- public:
- TextBalloon(QQuickItem *parent = 0);
- void paint(QPainter *painter);
-
- bool isRightAligned();
- void setRightAligned(bool rightAligned);
-
- private:
- bool rightAligned;
-
- signals:
- void rightAlignedChanged();
-};
-//! [0]
-
-#endif
diff --git a/examples/quick/customitems/painteditem/textballoons.qml b/examples/quick/customitems/painteditem/textballoons.qml
index 2c749bb440..1ef491f061 100644
--- a/examples/quick/customitems/painteditem/textballoons.qml
+++ b/examples/quick/customitems/painteditem/textballoons.qml
@@ -1,55 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
-import "TextBalloonPlugin" 1.0
+import QtQuick
+import TextBalloon
Item {
height: 480
@@ -67,14 +20,14 @@ Item {
}
ListView {
+ id: balloonView
anchors.bottom: controls.top
anchors.bottomMargin: 2
anchors.top: parent.top
- id: balloonView
delegate: TextBalloon {
- anchors.right: index % 2 == 0 ? undefined : parent.right
+ anchors.right: index % 2 != 0 ? parent?.right : undefined
height: 60
- rightAligned: index % 2 == 0 ? false : true
+ rightAligned: index % 2 != 0
width: balloonWidth
}
model: balloonModel
@@ -97,7 +50,7 @@ Item {
Text {
anchors.centerIn: parent
- text: "Add another balloon"
+ text: qsTr("Add another balloon")
}
MouseArea {
diff --git a/examples/quick/customitems/painteditem/textballoonuser.pro b/examples/quick/customitems/painteditem/textballoonuser.pro
new file mode 100644
index 0000000000..7504542f4c
--- /dev/null
+++ b/examples/quick/customitems/painteditem/textballoonuser.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+
+QT += qml quick
+
+TARGET = painteditem
+SOURCES += main.cpp
+RESOURCES += painteditem.qrc
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/painteditem
+INSTALLS += target
diff --git a/examples/quick/customitems/progressbar/content/ProgressBar.qml b/examples/quick/customitems/progressbar/content/ProgressBar.qml
deleted file mode 100644
index 594cccfe75..0000000000
--- a/examples/quick/customitems/progressbar/content/ProgressBar.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-Item {
- id: progressbar
-
- property int minimum: 0
- property int maximum: 100
- property int value: 0
- property alias color: gradient1.color
- property alias secondColor: gradient2.color
-
- width: 250; height: 23
- clip: true
-
- BorderImage {
- source: "background.png"
- width: parent.width; height: parent.height
- border { left: 4; top: 4; right: 4; bottom: 4 }
- }
-
- Rectangle {
- id: highlight
-
- property int widthDest: ((progressbar.width * (value - minimum)) / (maximum - minimum) - 6)
-
- width: highlight.widthDest
- Behavior on width { SmoothedAnimation { velocity: 1200 } }
-
- anchors { left: parent.left; top: parent.top; bottom: parent.bottom; margins: 3 }
- radius: 1
- gradient: Gradient {
- GradientStop { id: gradient1; position: 0.0 }
- GradientStop { id: gradient2; position: 1.0 }
- }
-
- }
- Text {
- anchors { right: highlight.right; rightMargin: 6; verticalCenter: parent.verticalCenter }
- color: "white"
- font.bold: true
- text: Math.floor((value - minimum) / (maximum - minimum) * 100) + '%'
- }
-}
diff --git a/examples/quick/customitems/progressbar/content/background.png b/examples/quick/customitems/progressbar/content/background.png
deleted file mode 100644
index 5c316bc03e..0000000000
--- a/examples/quick/customitems/progressbar/content/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/progressbar/main.qml b/examples/quick/customitems/progressbar/main.qml
deleted file mode 100644
index 2dd67621a8..0000000000
--- a/examples/quick/customitems/progressbar/main.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-import "content"
-
-Rectangle {
- id: main
-
- width: 600; height: 405
- color: "#edecec"
-
- Flickable {
- anchors.fill: parent
- contentHeight: column.height + 20
-
- Column {
- id: column
- x: 10; y: 10
- spacing: 10
-
- Repeater {
- model: 25
-
- ProgressBar {
- property int r: Math.floor(Math.random() * 5000 + 1000)
- width: main.width - 20
-
- NumberAnimation on value { duration: r; from: 0; to: 100; loops: Animation.Infinite }
- ColorAnimation on color { duration: r; from: "lightsteelblue"; to: "thistle"; loops: Animation.Infinite }
- ColorAnimation on secondColor { duration: r; from: "steelblue"; to: "#CD96CD"; loops: Animation.Infinite }
- }
- }
- }
- }
-}
diff --git a/examples/quick/customitems/scrollbar/ScrollBar.qml b/examples/quick/customitems/scrollbar/ScrollBar.qml
deleted file mode 100644
index f2e46c5681..0000000000
--- a/examples/quick/customitems/scrollbar/ScrollBar.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-Item {
- id: scrollBar
-
- // The properties that define the scrollbar's state.
- // position and pageSize are in the range 0.0 - 1.0. They are relative to the
- // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
- // of the height of the view.
- // orientation can be either Qt.Vertical or Qt.Horizontal
- property real position
- property real pageSize
- property variant orientation : Qt.Vertical
-
- // A light, semi-transparent background
- Rectangle {
- id: background
- anchors.fill: parent
- radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
- color: "white"
- opacity: 0.3
- }
-
- // Size the bar to the required size, depending upon the orientation.
- Rectangle {
- x: orientation == Qt.Vertical ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
- y: orientation == Qt.Vertical ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
- width: orientation == Qt.Vertical ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
- height: orientation == Qt.Vertical ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
- radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
- color: "black"
- opacity: 0.7
- }
-}
diff --git a/examples/quick/customitems/scrollbar/doc/images/qml-scrollbar-example.png b/examples/quick/customitems/scrollbar/doc/images/qml-scrollbar-example.png
deleted file mode 100644
index 2c80421b06..0000000000
--- a/examples/quick/customitems/scrollbar/doc/images/qml-scrollbar-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/scrollbar/doc/src/scrollbar.qdoc b/examples/quick/customitems/scrollbar/doc/src/scrollbar.qdoc
deleted file mode 100644
index 37852222c0..0000000000
--- a/examples/quick/customitems/scrollbar/doc/src/scrollbar.qdoc
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
- \title UI Components: Scroll Bar Example
- \example customitems/scrollbar
- \brief The Scroll Bar Example shows how to use scroll bars on a flickable element.
-
- This example shows how to create scroll bars for a \l Flickable element
- using the \l {Flickable::visibleArea.xPosition}{Flickable::visibleArea}
- properties.
-
- \image qml-scrollbar-example.png
-*/
-
diff --git a/examples/quick/customitems/scrollbar/main.cpp b/examples/quick/customitems/scrollbar/main.cpp
deleted file mode 100644
index 579db41efd..0000000000
--- a/examples/quick/customitems/scrollbar/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(main)
diff --git a/examples/quick/customitems/scrollbar/main.qml b/examples/quick/customitems/scrollbar/main.qml
deleted file mode 100644
index 9248e44a42..0000000000
--- a/examples/quick/customitems/scrollbar/main.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-Rectangle {
- width: 640
- height: 480
-
- // Create a flickable to view a large image.
- Flickable {
- id: view
- anchors.fill: parent
- contentWidth: picture.width
- contentHeight: picture.height
-
- Image {
- id: picture
- source: "pics/niagara_falls.jpg"
- asynchronous: true
- }
-
- // Only show the scrollbars when the view is moving.
- states: State {
- name: "ShowBars"
- when: view.movingVertically || view.movingHorizontally
- PropertyChanges { target: verticalScrollBar; opacity: 1 }
- PropertyChanges { target: horizontalScrollBar; opacity: 1 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "opacity"; duration: 400 }
- }
- }
-
- // Attach scrollbars to the right and bottom edges of the view.
- ScrollBar {
- id: verticalScrollBar
- width: 12; height: view.height-12
- anchors.right: view.right
- opacity: 0
- orientation: Qt.Vertical
- position: view.visibleArea.yPosition
- pageSize: view.visibleArea.heightRatio
- }
-
- ScrollBar {
- id: horizontalScrollBar
- width: view.width-12; height: 12
- anchors.bottom: view.bottom
- opacity: 0
- orientation: Qt.Horizontal
- position: view.visibleArea.xPosition
- pageSize: view.visibleArea.widthRatio
- }
-}
diff --git a/examples/quick/customitems/scrollbar/pics/niagara_falls.jpg b/examples/quick/customitems/scrollbar/pics/niagara_falls.jpg
deleted file mode 100644
index e625c0d3e6..0000000000
--- a/examples/quick/customitems/scrollbar/pics/niagara_falls.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/scrollbar/scrollbar.pro b/examples/quick/customitems/scrollbar/scrollbar.pro
deleted file mode 100644
index 7e6ea3c2d6..0000000000
--- a/examples/quick/customitems/scrollbar/scrollbar.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += scrollbar.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/scrollbar
-INSTALLS += target
diff --git a/examples/quick/customitems/scrollbar/scrollbar.qmlproject b/examples/quick/customitems/scrollbar/scrollbar.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/customitems/scrollbar/scrollbar.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/scrollbar/scrollbar.qrc b/examples/quick/customitems/scrollbar/scrollbar.qrc
deleted file mode 100644
index b1ba5f9211..0000000000
--- a/examples/quick/customitems/scrollbar/scrollbar.qrc
+++ /dev/null
@@ -1,7 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>ScrollBar.qml</file>
- <file>pics/niagara_falls.jpg</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/customitems/searchbox/SearchBox.qml b/examples/quick/customitems/searchbox/SearchBox.qml
deleted file mode 100644
index 13927e0d6f..0000000000
--- a/examples/quick/customitems/searchbox/SearchBox.qml
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-FocusScope {
- id: focusScope
- width: 250; height: 28
-
- BorderImage {
- source: "images/lineedit-bg.png"
- width: parent.width; height: parent.height
- border { left: 4; top: 4; right: 4; bottom: 4 }
- }
-
- BorderImage {
- source: "images/lineedit-bg-focus.png"
- width: parent.width; height: parent.height
- border { left: 4; top: 4; right: 4; bottom: 4 }
- visible: parent.activeFocus ? true : false
- }
-
- Text {
- id: typeSomething
- anchors.fill: parent; anchors.leftMargin: 8
- verticalAlignment: Text.AlignVCenter
- text: "Type something..."
- color: "gray"
- font.italic: true
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: { focusScope.focus = true; Qt.inputMethod.show(); }
- }
-
- TextInput {
- id: textInput
- anchors { left: parent.left; leftMargin: 8; right: clear.left; rightMargin: 8; verticalCenter: parent.verticalCenter }
- focus: true
- selectByMouse: true
- }
-
- Image {
- id: clear
- anchors { right: parent.right; rightMargin: 8; verticalCenter: parent.verticalCenter }
- source: "images/clear.png"
- opacity: 0
-
- MouseArea {
- anchors.fill: parent
- onClicked: { textInput.text = ''; focusScope.focus = true; textInput.openSoftwareInputPanel(); }
- }
- }
-
- states: State {
- name: "hasText"; when: textInput.text != ''
- PropertyChanges { target: typeSomething; opacity: 0 }
- PropertyChanges { target: clear; opacity: 1 }
- }
-
- transitions: [
- Transition {
- from: ""; to: "hasText"
- NumberAnimation { exclude: typeSomething; properties: "opacity" }
- },
- Transition {
- from: "hasText"; to: ""
- NumberAnimation { properties: "opacity" }
- }
- ]
-}
diff --git a/examples/quick/customitems/searchbox/images/clear.png b/examples/quick/customitems/searchbox/images/clear.png
deleted file mode 100644
index c20a9cfba5..0000000000
--- a/examples/quick/customitems/searchbox/images/clear.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/searchbox/images/lineedit-bg-focus.png b/examples/quick/customitems/searchbox/images/lineedit-bg-focus.png
deleted file mode 100644
index c8f2722298..0000000000
--- a/examples/quick/customitems/searchbox/images/lineedit-bg-focus.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/searchbox/images/lineedit-bg.png b/examples/quick/customitems/searchbox/images/lineedit-bg.png
deleted file mode 100644
index 5c316bc03e..0000000000
--- a/examples/quick/customitems/searchbox/images/lineedit-bg.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/searchbox/main.cpp b/examples/quick/customitems/searchbox/main.cpp
deleted file mode 100644
index 579db41efd..0000000000
--- a/examples/quick/customitems/searchbox/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(main)
diff --git a/examples/quick/customitems/searchbox/main.qml b/examples/quick/customitems/searchbox/main.qml
deleted file mode 100644
index bc6900ba7e..0000000000
--- a/examples/quick/customitems/searchbox/main.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-Rectangle {
- id: page
- width: 500; height: 250
- color: "#edecec"
-
- MouseArea {
- anchors.fill: parent
- onClicked: page.focus = false;
- }
- Column {
- anchors { horizontalCenter: parent.horizontalCenter; verticalCenter: parent.verticalCenter }
- spacing: 10
-
- SearchBox { id: search1; KeyNavigation.tab: search2; KeyNavigation.backtab: search3; focus: true }
- SearchBox { id: search2; KeyNavigation.tab: search3; KeyNavigation.backtab: search1 }
- SearchBox { id: search3; KeyNavigation.tab: search1; KeyNavigation.backtab: search2 }
- }
-}
diff --git a/examples/quick/customitems/searchbox/searchbox.pro b/examples/quick/customitems/searchbox/searchbox.pro
deleted file mode 100644
index c22fc117aa..0000000000
--- a/examples/quick/customitems/searchbox/searchbox.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += searchbox.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/searchbox
-INSTALLS += target
diff --git a/examples/quick/customitems/searchbox/searchbox.qmlproject b/examples/quick/customitems/searchbox/searchbox.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/customitems/searchbox/searchbox.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/searchbox/searchbox.qrc b/examples/quick/customitems/searchbox/searchbox.qrc
deleted file mode 100644
index f7a8602c9a..0000000000
--- a/examples/quick/customitems/searchbox/searchbox.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>SearchBox.qml</file>
- <file>images/clear.png</file>
- <file>images/lineedit-bg-focus.png</file>
- <file>images/lineedit-bg.png</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/customitems/slideswitch/content/Switch.qml b/examples/quick/customitems/slideswitch/content/Switch.qml
deleted file mode 100644
index 72eb13e1e3..0000000000
--- a/examples/quick/customitems/slideswitch/content/Switch.qml
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: toggleswitch
- width: background.width; height: background.height
-
-//![1]
- property bool on: false
-//![1]
-
-//![2]
- function toggle() {
- if (toggleswitch.state == "on")
- toggleswitch.state = "off";
- else
- toggleswitch.state = "on";
- }
-//![2]
-
-//![3]
- function releaseSwitch() {
- if (knob.x == 1) {
- if (toggleswitch.state == "off") return;
- }
- if (knob.x == 78) {
- if (toggleswitch.state == "on") return;
- }
- toggle();
- }
-//![3]
-
-//![4]
- Image {
- id: background
- source: "background.png"
- MouseArea { anchors.fill: parent; onClicked: toggle() }
- }
-//![4]
-
-//![5]
- Image {
- id: knob
- x: 1; y: 2
- source: "knob.png"
-
- MouseArea {
- anchors.fill: parent
- drag.target: knob; drag.axis: Drag.XAxis; drag.minimumX: 1; drag.maximumX: 78
- onClicked: toggle()
- onReleased: releaseSwitch()
- }
- }
-//![5]
-
-//![6]
- states: [
- State {
- name: "on"
- PropertyChanges { target: knob; x: 78 }
- PropertyChanges { target: toggleswitch; on: true }
- },
- State {
- name: "off"
- PropertyChanges { target: knob; x: 1 }
- PropertyChanges { target: toggleswitch; on: false }
- }
- ]
-//![6]
-
-//![7]
- transitions: Transition {
- NumberAnimation { properties: "x"; easing.type: Easing.InOutQuad; duration: 200 }
- }
-//![7]
-}
-//![0]
diff --git a/examples/quick/customitems/slideswitch/content/background.png b/examples/quick/customitems/slideswitch/content/background.png
deleted file mode 100644
index d736815870..0000000000
--- a/examples/quick/customitems/slideswitch/content/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/slideswitch/content/background.svg b/examples/quick/customitems/slideswitch/content/background.svg
deleted file mode 100644
index f920d3e47a..0000000000
--- a/examples/quick/customitems/slideswitch/content/background.svg
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
- xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
- x="0px" y="0px" width="130px" height="56px" viewBox="0 0 130 56" enable-background="new 0 0 130 56" xml:space="preserve">
-<defs>
-</defs>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-37.5005" y1="-66" x2="-37.5005" y2="-121.9985" gradientTransform="matrix(1 0 0 -1 102.5 -66)">
- <stop offset="0.0056" style="stop-color:#000000"/>
- <stop offset="1" style="stop-color:#EAECEF"/>
-</linearGradient>
-<path fill="url(#SVGID_1_)" d="M101.998,55.998H28c-15.439,0-28-12.562-28-28C0,12.56,12.561,0,28,0h73.998
- c15.439,0,28,12.559,28,27.998C129.998,43.438,117.438,55.998,101.998,55.998L101.998,55.998z"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-5.5" y1="-132.1338" x2="-69.5002" y2="-55.8613" gradientTransform="matrix(1 0 0 -1 102.5 -66)">
- <stop offset="0.0056" style="stop-color:#000000"/>
- <stop offset="1" style="stop-color:#828385"/>
-</linearGradient>
-<path fill="url(#SVGID_2_)" d="M127.999,27.998c0,14.359-11.642,26-26,26h-74c-14.359,0-26-11.641-26-26l0,0
- c0-14.359,11.641-26,26-26h74C116.357,1.998,127.999,13.639,127.999,27.998L127.999,27.998z"/>
-</svg>
diff --git a/examples/quick/customitems/slideswitch/content/knob.png b/examples/quick/customitems/slideswitch/content/knob.png
deleted file mode 100644
index ee0a436f84..0000000000
--- a/examples/quick/customitems/slideswitch/content/knob.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/slideswitch/content/knob.svg b/examples/quick/customitems/slideswitch/content/knob.svg
deleted file mode 100644
index fb6933718e..0000000000
--- a/examples/quick/customitems/slideswitch/content/knob.svg
+++ /dev/null
@@ -1,867 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In -->
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.1"
- x="0px"
- y="0px"
- width="52px"
- height="52px"
- viewBox="0 0 52 52"
- enable-background="new 0 0 52 52"
- xml:space="preserve"
- id="svg3883"
- sodipodi:version="0.32"
- inkscape:version="0.44.1"
- sodipodi:docname="knob_on.svg"
- sodipodi:docbase="/local/axel/embeddedwidgets/embeddedstories/skins/svgslideswitch/MetallicBrush"><metadata
- id="metadata4200"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
- inkscape:window-height="640"
- inkscape:window-width="937"
- inkscape:pageshadow="2"
- inkscape:pageopacity="0.0"
- guidetolerance="10.0"
- gridtolerance="10.0"
- objecttolerance="10.0"
- borderopacity="1.0"
- bordercolor="#666666"
- pagecolor="#ffffff"
- id="base"
- inkscape:zoom="8.3653846"
- inkscape:cx="26.000002"
- inkscape:cy="26"
- inkscape:window-x="0"
- inkscape:window-y="0"
- inkscape:current-layer="svg3883" />
-<defs
- id="defs3885">
-</defs>
-<linearGradient
- id="SVGID_1_"
- gradientUnits="userSpaceOnUse"
- x1="-59.7866"
- y1="-115.917"
- x2="-93.2123"
- y2="-76.0818"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#000000"
- id="stop3888" />
- <stop
- offset="1"
- style="stop-color:#EAECEF"
- id="stop3890" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="26"
- id="circle3892"
- style="fill:url(#SVGID_1_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="26"
- sodipodi:ry="26"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_2_"
- gradientUnits="userSpaceOnUse"
- x1="-100.5"
- y1="-96"
- x2="-52.5"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3895" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3897" />
- <stop
- offset="0.6043"
- style="stop-color:#E7EAED"
- id="stop3899" />
- <stop
- offset="0.6751"
- style="stop-color:#DEE4E7"
- id="stop3901" />
- <stop
- offset="0.7358"
- style="stop-color:#CFD9DD"
- id="stop3903" />
- <stop
- offset="0.791"
- style="stop-color:#B9CACF"
- id="stop3905" />
- <stop
- offset="0.8425"
- style="stop-color:#9EB6BD"
- id="stop3907" />
- <stop
- offset="0.891"
- style="stop-color:#7B9EA7"
- id="stop3909" />
- <stop
- offset="0.9374"
- style="stop-color:#53828C"
- id="stop3911" />
- <stop
- offset="0.9809"
- style="stop-color:#25626E"
- id="stop3913" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop3915" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="24"
- id="circle3917"
- style="fill:url(#SVGID_2_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="24"
- sodipodi:ry="24"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_3_"
- gradientUnits="userSpaceOnUse"
- x1="-98.6328"
- y1="-96"
- x2="-54.3672"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3920" />
- <stop
- offset="0.073"
- style="stop-color:#8FAECB"
- id="stop3922" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3924" />
- <stop
- offset="0.5902"
- style="stop-color:#E7E9ED"
- id="stop3926" />
- <stop
- offset="0.618"
- style="stop-color:#E4E7EB"
- id="stop3928" />
- <stop
- offset="0.6697"
- style="stop-color:#E0E4E9"
- id="stop3930" />
- <stop
- offset="0.7211"
- style="stop-color:#D4DCE1"
- id="stop3932" />
- <stop
- offset="0.7722"
- style="stop-color:#C0CFD5"
- id="stop3934" />
- <stop
- offset="0.809"
- style="stop-color:#ADC2C9"
- id="stop3936" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop3938" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="22.132999"
- id="circle3940"
- style="fill:url(#SVGID_3_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="22.132999"
- sodipodi:ry="22.132999"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_4_"
- gradientUnits="userSpaceOnUse"
- x1="-96.7671"
- y1="-96"
- x2="-56.2324"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3943" />
- <stop
- offset="0.073"
- style="stop-color:#86A7C4"
- id="stop3945" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3947" />
- <stop
- offset="0.577"
- style="stop-color:#E7EAED"
- id="stop3949" />
- <stop
- offset="0.618"
- style="stop-color:#E1E6EA"
- id="stop3951" />
- <stop
- offset="0.6697"
- style="stop-color:#DDE3E8"
- id="stop3953" />
- <stop
- offset="0.7211"
- style="stop-color:#D1DBE1"
- id="stop3955" />
- <stop
- offset="0.7722"
- style="stop-color:#BDCDD5"
- id="stop3957" />
- <stop
- offset="0.809"
- style="stop-color:#AAC0CA"
- id="stop3959" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop3961" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="20.267"
- id="circle3963"
- style="fill:url(#SVGID_4_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="20.267"
- sodipodi:ry="20.267"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_5_"
- gradientUnits="userSpaceOnUse"
- x1="-94.8999"
- y1="-96"
- x2="-58.0996"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3966" />
- <stop
- offset="0.073"
- style="stop-color:#7E9FBC"
- id="stop3968" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3970" />
- <stop
- offset="0.5709"
- style="stop-color:#E6E9ED"
- id="stop3972" />
- <stop
- offset="0.618"
- style="stop-color:#DFE4E9"
- id="stop3974" />
- <stop
- offset="0.6687"
- style="stop-color:#DBE1E7"
- id="stop3976" />
- <stop
- offset="0.7193"
- style="stop-color:#CFD9E0"
- id="stop3978" />
- <stop
- offset="0.7695"
- style="stop-color:#BBCCD6"
- id="stop3980" />
- <stop
- offset="0.809"
- style="stop-color:#A6BECA"
- id="stop3982" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop3984" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="18.4"
- id="circle3986"
- style="fill:url(#SVGID_5_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="18.4"
- sodipodi:ry="18.4"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_6_"
- gradientUnits="userSpaceOnUse"
- x1="-93.0332"
- y1="-96"
- x2="-59.9668"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop3989" />
- <stop
- offset="0.073"
- style="stop-color:#7697B4"
- id="stop3991" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop3993" />
- <stop
- offset="0.5636"
- style="stop-color:#E6E9ED"
- id="stop3995" />
- <stop
- offset="0.618"
- style="stop-color:#DCE2E8"
- id="stop3997" />
- <stop
- offset="0.6687"
- style="stop-color:#D8DFE6"
- id="stop3999" />
- <stop
- offset="0.7193"
- style="stop-color:#CCD7E0"
- id="stop4001" />
- <stop
- offset="0.7695"
- style="stop-color:#B8CAD5"
- id="stop4003" />
- <stop
- offset="0.809"
- style="stop-color:#A3BCCA"
- id="stop4005" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4007" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="16.533001"
- id="circle4009"
- style="fill:url(#SVGID_6_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="16.533001"
- sodipodi:ry="16.533001"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_7_"
- gradientUnits="userSpaceOnUse"
- x1="-91.167"
- y1="-96"
- x2="-61.833"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4012" />
- <stop
- offset="0.073"
- style="stop-color:#6D8FAD"
- id="stop4014" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4016" />
- <stop
- offset="0.5605"
- style="stop-color:#E5E8EC"
- id="stop4018" />
- <stop
- offset="0.618"
- style="stop-color:#DAE1E7"
- id="stop4020" />
- <stop
- offset="0.6679"
- style="stop-color:#D6DEE5"
- id="stop4022" />
- <stop
- offset="0.7175"
- style="stop-color:#CAD6DF"
- id="stop4024" />
- <stop
- offset="0.7669"
- style="stop-color:#B6C9D6"
- id="stop4026" />
- <stop
- offset="0.809"
- style="stop-color:#9FBACB"
- id="stop4028" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4030" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="14.667"
- id="circle4032"
- style="fill:url(#SVGID_7_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="14.667"
- sodipodi:ry="14.667"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_8_"
- gradientUnits="userSpaceOnUse"
- x1="-89.2998"
- y1="-96"
- x2="-63.7002"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4035" />
- <stop
- offset="0.073"
- style="stop-color:#6587A5"
- id="stop4037" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4039" />
- <stop
- offset="0.5588"
- style="stop-color:#E4E8EC"
- id="stop4041" />
- <stop
- offset="0.618"
- style="stop-color:#D8DFE7"
- id="stop4043" />
- <stop
- offset="0.6675"
- style="stop-color:#D4DCE5"
- id="stop4045" />
- <stop
- offset="0.7167"
- style="stop-color:#C8D5E0"
- id="stop4047" />
- <stop
- offset="0.7657"
- style="stop-color:#B4C8D6"
- id="stop4049" />
- <stop
- offset="0.809"
- style="stop-color:#9CB8CB"
- id="stop4051" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4053" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="12.8"
- id="circle4055"
- style="fill:url(#SVGID_8_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="12.8"
- sodipodi:ry="12.8"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_9_"
- gradientUnits="userSpaceOnUse"
- x1="-87.4331"
- y1="-96"
- x2="-65.5664"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4058" />
- <stop
- offset="0.073"
- style="stop-color:#5D809D"
- id="stop4060" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4062" />
- <stop
- offset="0.5567"
- style="stop-color:#E3E7EC"
- id="stop4064" />
- <stop
- offset="0.618"
- style="stop-color:#D5DDE6"
- id="stop4066" />
- <stop
- offset="0.6671"
- style="stop-color:#D1DAE4"
- id="stop4068" />
- <stop
- offset="0.7159"
- style="stop-color:#C5D3DF"
- id="stop4070" />
- <stop
- offset="0.7645"
- style="stop-color:#B1C6D6"
- id="stop4072" />
- <stop
- offset="0.809"
- style="stop-color:#98B5CB"
- id="stop4074" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4076" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="10.933"
- id="circle4078"
- style="fill:url(#SVGID_9_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="10.933"
- sodipodi:ry="10.933"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_10_"
- gradientUnits="userSpaceOnUse"
- x1="-85.5659"
- y1="-96"
- x2="-67.4336"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4081" />
- <stop
- offset="0.073"
- style="stop-color:#547896"
- id="stop4083" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4085" />
- <stop
- offset="0.5588"
- style="stop-color:#E1E6EB"
- id="stop4087" />
- <stop
- offset="0.618"
- style="stop-color:#D3DCE5"
- id="stop4089" />
- <stop
- offset="0.6663"
- style="stop-color:#CFD9E3"
- id="stop4091" />
- <stop
- offset="0.7143"
- style="stop-color:#C3D2DF"
- id="stop4093" />
- <stop
- offset="0.7621"
- style="stop-color:#AFC5D7"
- id="stop4095" />
- <stop
- offset="0.809"
- style="stop-color:#94B3CC"
- id="stop4097" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4099" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="9.066"
- id="circle4101"
- style="fill:url(#SVGID_10_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="9.066"
- sodipodi:ry="9.066"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_11_"
- gradientUnits="userSpaceOnUse"
- x1="-83.7002"
- y1="-96"
- x2="-69.2998"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4104" />
- <stop
- offset="0.073"
- style="stop-color:#4C708E"
- id="stop4106" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4108" />
- <stop
- offset="0.5625"
- style="stop-color:#DEE4EA"
- id="stop4110" />
- <stop
- offset="0.618"
- style="stop-color:#D0DAE4"
- id="stop4112" />
- <stop
- offset="0.6663"
- style="stop-color:#CCD7E2"
- id="stop4114" />
- <stop
- offset="0.7143"
- style="stop-color:#C0D0DE"
- id="stop4116" />
- <stop
- offset="0.7621"
- style="stop-color:#ACC3D6"
- id="stop4118" />
- <stop
- offset="0.809"
- style="stop-color:#91B1CC"
- id="stop4120" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4122" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="7.1999998"
- id="circle4124"
- style="fill:url(#SVGID_11_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="7.1999998"
- sodipodi:ry="7.1999998"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_12_"
- gradientUnits="userSpaceOnUse"
- x1="-81.833"
- y1="-96"
- x2="-71.167"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4127" />
- <stop
- offset="0.073"
- style="stop-color:#446986"
- id="stop4129" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4131" />
- <stop
- offset="0.5757"
- style="stop-color:#D9E0E8"
- id="stop4133" />
- <stop
- offset="0.618"
- style="stop-color:#CED8E3"
- id="stop4135" />
- <stop
- offset="0.6655"
- style="stop-color:#CAD5E2"
- id="stop4137" />
- <stop
- offset="0.7129"
- style="stop-color:#BECEDD"
- id="stop4139" />
- <stop
- offset="0.7601"
- style="stop-color:#AAC1D6"
- id="stop4141" />
- <stop
- offset="0.807"
- style="stop-color:#8EB0CC"
- id="stop4143" />
- <stop
- offset="0.809"
- style="stop-color:#8DAFCC"
- id="stop4145" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4147" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="5.3330002"
- id="circle4149"
- style="fill:url(#SVGID_12_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="5.3330002"
- sodipodi:ry="5.3330002"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_13_"
- gradientUnits="userSpaceOnUse"
- x1="-79.9658"
- y1="-96"
- x2="-73.0342"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4152" />
- <stop
- offset="0.073"
- style="stop-color:#3B617F"
- id="stop4154" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4156" />
- <stop
- offset="0.6087"
- style="stop-color:#CED9E3"
- id="stop4158" />
- <stop
- offset="0.618"
- style="stop-color:#CBD7E2"
- id="stop4160" />
- <stop
- offset="0.6655"
- style="stop-color:#C7D4E1"
- id="stop4162" />
- <stop
- offset="0.7129"
- style="stop-color:#BBCDDD"
- id="stop4164" />
- <stop
- offset="0.7601"
- style="stop-color:#A7C0D6"
- id="stop4166" />
- <stop
- offset="0.807"
- style="stop-color:#8BAECD"
- id="stop4168" />
- <stop
- offset="0.809"
- style="stop-color:#8AADCD"
- id="stop4170" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4172" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="3.4660001"
- id="circle4174"
- style="fill:url(#SVGID_13_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="3.4660001"
- sodipodi:ry="3.4660001"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-<linearGradient
- id="SVGID_14_"
- gradientUnits="userSpaceOnUse"
- x1="-78.1001"
- y1="-96"
- x2="-74.9004"
- y2="-96"
- gradientTransform="matrix(1,0,0,-1,102.5,-70)">
- <stop
- offset="0.0056"
- style="stop-color:#8AADCE"
- id="stop4177" />
- <stop
- offset="0.073"
- style="stop-color:#335977"
- id="stop4179" />
- <stop
- offset="0.5"
- style="stop-color:#EAECEF"
- id="stop4181" />
- <stop
- offset="0.618"
- style="stop-color:#C9D5E1"
- id="stop4183" />
- <stop
- offset="0.6648"
- style="stop-color:#C5D3E0"
- id="stop4185" />
- <stop
- offset="0.7114"
- style="stop-color:#B9CBDC"
- id="stop4187" />
- <stop
- offset="0.758"
- style="stop-color:#A5BFD6"
- id="stop4189" />
- <stop
- offset="0.8042"
- style="stop-color:#89ADCE"
- id="stop4191" />
- <stop
- offset="0.809"
- style="stop-color:#86ABCD"
- id="stop4193" />
- <stop
- offset="1"
- style="stop-color:#0E525F"
- id="stop4195" />
-</linearGradient>
-<circle
- cx="26"
- cy="26"
- r="1.6"
- id="circle4197"
- style="fill:url(#SVGID_14_)"
- sodipodi:cx="26"
- sodipodi:cy="26"
- sodipodi:rx="1.6"
- sodipodi:ry="1.6"
- transform="matrix(0.923077,0,0,0.923077,2,1.999996)" />
-</svg> \ No newline at end of file
diff --git a/examples/quick/customitems/slideswitch/doc/src/example-slideswitch.qdoc b/examples/quick/customitems/slideswitch/doc/src/example-slideswitch.qdoc
deleted file mode 100644
index 19c79dea97..0000000000
--- a/examples/quick/customitems/slideswitch/doc/src/example-slideswitch.qdoc
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-/*!
-\page qmlexampletoggleswitch.html tutorial
-\title Qt Quick Examples - Toggle Switch
-\brief A reusable switch component made in QML
- \ingroup qtquickexamples
-
-This example shows how to create a reusable switch component in QML.
-
-The code for this example can be found in the \c examples/quick/customitems/slideswitch directory.
-
-The objects that compose the switch are:
-
-\list
-\li a \c on property (the interface to interact with the switch),
-\li two images (the background image and the knob),
-\li two mouse regions for user interation (on the background image and on the knob),
-\li two states (an \e on state and an \e off state),
-\li two functions or slots to react to the user interation (\c toggle() and \c dorelease()),
-\li and a transition that describe how to go from one state to the other.
-\endlist
-
-\section1 Switch.qml
-\snippet customitems/slideswitch/content/Switch.qml 0
-
-\section1 Walkthrough
-
-\section2 Interface
-\snippet customitems/slideswitch/content/Switch.qml 1
-
-This property is the interface of the switch. By default, the switch is off and this property is \c false.
-It can be used to activate/deactivate the switch or to query its current state.
-
-In this example:
-
-\qml
-Item {
- Switch {
- id: mySwitch
- on: true
- }
- Text {
- text: "The switch is on"
- visible: mySwitch.on == true
- }
-}
-\endqml
-
-the text will only be visible when the switch is on.
-
-\section2 Images and User Interaction
-\snippet customitems/slideswitch/content/Switch.qml 4
-
-First, we create the background image of the switch.
-In order for the switch to toggle when the user clicks on the background, we add a \l{MouseArea} as a child item of the image.
-A \c MouseArea has a \c onClicked property that is triggered when the item is clicked. For the moment we will just call a
-\c toggle() function. We will see what this function does in a moment.
-
-\snippet customitems/slideswitch/content/Switch.qml 5
-
-Then, we place the image of the knob on top of the background.
-The interaction here is a little more complex. We want the knob to move with the finger when it is clicked. That is what the \c drag
-property of the \c MouseArea is for. We also want to toggle the switch if the knob is released between state. We handle this case
-in the \c dorelease() function that is called in the \c onReleased property.
-
-\section2 States
-\snippet customitems/slideswitch/content/Switch.qml 6
-
-We define the two states of the switch:
-\list
-\li In the \e on state the knob is on the right (\c x position is 78) and the \c on property is \c true.
-\li In the \e off state the knob is on the left (\c x position is 1) and the \c on property is \c false.
-\endlist
-
-For more information on states see \l{Qt Quick States}.
-
-\section2 Functions
-
-We add two JavaScript functions to our switch:
-
-\snippet customitems/slideswitch/content/Switch.qml 2
-
-This first function is called when the background image or the knob are clicked. We simply want the switch to toggle between the two
-states (\e on and \e off).
-
-
-\snippet customitems/slideswitch/content/Switch.qml 3
-
-This second function is called when the knob is released and we want to make sure that the knob does not end up between states
-(neither \e on nor \e off). If it is the case call the \c toggle() function otherwise we do nothing.
-
-For more information on scripts see \l{JavaScript Expressions in QML Documents}.
-
-\section2 Transition
-\snippet customitems/slideswitch/content/Switch.qml 7
-
-At this point, when the switch toggles between the two states the knob will instantly change its \c x position between 1 and 78.
-In order for the knob to move smoothly we add a transition that will animate the \c x property with an easing curve for a duration of 200ms.
-
-For more information on transitions see \l{Animation and Transitions in Qt Quick}.
-
-\section1 Usage
-The switch can be used in a QML file, like this:
-\snippet customitems/slideswitch/slideswitch.qml 0
-*/
diff --git a/examples/quick/customitems/slideswitch/slideswitch.qml b/examples/quick/customitems/slideswitch/slideswitch.qml
deleted file mode 100644
index 7ddbfc2928..0000000000
--- a/examples/quick/customitems/slideswitch/slideswitch.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-import "content"
-
-Rectangle {
- color: "white"
- width: 400; height: 250
-
-//![0]
- Switch { anchors.centerIn: parent; on: false }
-//![0]
-}
diff --git a/examples/quick/customitems/spinner/content/Spinner.qml b/examples/quick/customitems/spinner/content/Spinner.qml
deleted file mode 100644
index 0eec968ed1..0000000000
--- a/examples/quick/customitems/spinner/content/Spinner.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-Image {
- property alias model: view.model
- property alias delegate: view.delegate
- property alias currentIndex: view.currentIndex
- property real itemHeight: 30
-
- source: "spinner-bg.png"
- clip: true
-
- PathView {
- id: view
- anchors.fill: parent
-
- pathItemCount: height/itemHeight
- preferredHighlightBegin: 0.5
- preferredHighlightEnd: 0.5
- highlight: Image { source: "spinner-select.png"; width: view.width; height: itemHeight+4 }
- dragMargin: view.width/2
-
- path: Path {
- startX: view.width/2; startY: -itemHeight/2
- PathLine { x: view.width/2; y: view.pathItemCount*itemHeight + itemHeight }
- }
- }
-
- Keys.onDownPressed: view.incrementCurrentIndex()
- Keys.onUpPressed: view.decrementCurrentIndex()
-}
diff --git a/examples/quick/customitems/spinner/content/spinner-bg.png b/examples/quick/customitems/spinner/content/spinner-bg.png
deleted file mode 100644
index da34fc4090..0000000000
--- a/examples/quick/customitems/spinner/content/spinner-bg.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/spinner/content/spinner-select.png b/examples/quick/customitems/spinner/content/spinner-select.png
deleted file mode 100644
index 95a17a1fe2..0000000000
--- a/examples/quick/customitems/spinner/content/spinner-select.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/spinner/main.cpp b/examples/quick/customitems/spinner/main.cpp
deleted file mode 100644
index 579db41efd..0000000000
--- a/examples/quick/customitems/spinner/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(main)
diff --git a/examples/quick/customitems/spinner/main.qml b/examples/quick/customitems/spinner/main.qml
deleted file mode 100644
index 82b31aba0c..0000000000
--- a/examples/quick/customitems/spinner/main.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-import "content"
-
-Rectangle {
- width: 240; height: 320
-
- Column {
- y: 20; x: 20; spacing: 20
-
- Spinner {
- id: spinner
- width: 200; height: 240
- focus: true
- model: 20
- itemHeight: 30
- delegate: Text { font.pixelSize: 25; text: index; height: 30 }
- }
-
- Text { text: "Current item index: " + spinner.currentIndex }
- }
-}
diff --git a/examples/quick/customitems/spinner/spinner.pro b/examples/quick/customitems/spinner/spinner.pro
deleted file mode 100644
index b5be6884d2..0000000000
--- a/examples/quick/customitems/spinner/spinner.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += spinner.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/spinner
-INSTALLS += target
diff --git a/examples/quick/customitems/spinner/spinner.qmlproject b/examples/quick/customitems/spinner/spinner.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/customitems/spinner/spinner.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/spinner/spinner.qrc b/examples/quick/customitems/spinner/spinner.qrc
deleted file mode 100644
index 3a8e4b17fd..0000000000
--- a/examples/quick/customitems/spinner/spinner.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>content/spinner-bg.png</file>
- <file>content/spinner-select.png</file>
- <file>content/Spinner.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/quick/customitems/tabwidget/TabWidget.qml b/examples/quick/customitems/tabwidget/TabWidget.qml
deleted file mode 100644
index d0e6f8224b..0000000000
--- a/examples/quick/customitems/tabwidget/TabWidget.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-Item {
- id: tabWidget
-
- // Setting the default property to stack.children means any child items
- // of the TabWidget are actually added to the 'stack' item's children.
- // See the "Property Binding"
- // documentation for details on default properties.
- default property alias content: stack.children
-
- property int current: 0
-
- onCurrentChanged: setOpacities()
- Component.onCompleted: setOpacities()
-
- function setOpacities() {
- for (var i = 0; i < stack.children.length; ++i) {
- stack.children[i].opacity = (i == current ? 1 : 0)
- }
- }
-
- Row {
- id: header
-
- Repeater {
- model: stack.children.length
- delegate: Rectangle {
- width: tabWidget.width / stack.children.length; height: 36
-
- Rectangle {
- width: parent.width; height: 1
- anchors { bottom: parent.bottom; bottomMargin: 1 }
- color: "#acb2c2"
- }
- BorderImage {
- anchors { fill: parent; leftMargin: 2; topMargin: 5; rightMargin: 1 }
- border { left: 7; right: 7 }
- source: "tab.png"
- visible: tabWidget.current == index
- }
- Text {
- horizontalAlignment: Qt.AlignHCenter; verticalAlignment: Qt.AlignVCenter
- anchors.fill: parent
- text: stack.children[index].title
- elide: Text.ElideRight
- font.bold: tabWidget.current == index
- }
- MouseArea {
- anchors.fill: parent
- onClicked: tabWidget.current = index
- }
- }
- }
- }
-
- Item {
- id: stack
- width: tabWidget.width
- anchors.top: header.bottom; anchors.bottom: tabWidget.bottom
- }
-}
diff --git a/examples/quick/customitems/tabwidget/doc/images/qml-tabwidget-example.png b/examples/quick/customitems/tabwidget/doc/images/qml-tabwidget-example.png
deleted file mode 100644
index 2e1cae2584..0000000000
--- a/examples/quick/customitems/tabwidget/doc/images/qml-tabwidget-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/tabwidget/doc/images/tab.png b/examples/quick/customitems/tabwidget/doc/images/tab.png
deleted file mode 100644
index 2ea989b68d..0000000000
--- a/examples/quick/customitems/tabwidget/doc/images/tab.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc b/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc
deleted file mode 100644
index a45c8107cb..0000000000
--- a/examples/quick/customitems/tabwidget/doc/src/tabwidget.qdoc
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** 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.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \title TabWidget Example
- \example customitems/tabwidget
- \brief The TabWidget example shows how to create a tabwidget using property aliases
- and QML Object default properties.
-
- This example shows how to create a tab widget. It also demonstrates how
- \l {Property aliases}{property aliases} and
- \l {QML Object Attributes#Default Properties}{default properties} can be used to collect and
- assemble the child items declared within an \l Item.
-
- \image qml-tabwidget-example.png
-*/
-
-
diff --git a/examples/quick/customitems/tabwidget/main.cpp b/examples/quick/customitems/tabwidget/main.cpp
deleted file mode 100644
index 579db41efd..0000000000
--- a/examples/quick/customitems/tabwidget/main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2020 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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$
-**
-****************************************************************************/
-#include "../../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(main)
diff --git a/examples/quick/customitems/tabwidget/main.qml b/examples/quick/customitems/tabwidget/main.qml
deleted file mode 100644
index 6867cf450b..0000000000
--- a/examples/quick/customitems/tabwidget/main.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples 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.0
-
-TabWidget {
- id: tabs
- width: 640; height: 480
-
- Rectangle {
- property string title: "Red"
- anchors.fill: parent
- color: "#e3e3e3"
-
- Rectangle {
- anchors.fill: parent; anchors.margins: 20
- color: "#ff7f7f"
- Text {
- width: parent.width - 20
- anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
- text: "Roses are red"
- font.pixelSize: 20
- wrapMode: Text.WordWrap
- }
- }
- }
-
- Rectangle {
- property string title: "Green"
- anchors.fill: parent
- color: "#e3e3e3"
-
- Rectangle {
- anchors.fill: parent; anchors.margins: 20
- color: "#7fff7f"
- Text {
- width: parent.width - 20
- anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
- text: "Flower stems are green"
- font.pixelSize: 20
- wrapMode: Text.WordWrap
- }
- }
- }
-
- Rectangle {
- property string title: "Blue"
- anchors.fill: parent; color: "#e3e3e3"
-
- Rectangle {
- anchors.fill: parent; anchors.margins: 20
- color: "#7f7fff"
- Text {
- width: parent.width - 20
- anchors.centerIn: parent; horizontalAlignment: Qt.AlignHCenter
- text: "Violets are blue"
- font.pixelSize: 20
- wrapMode: Text.WordWrap
- }
- }
- }
-}
diff --git a/examples/quick/customitems/tabwidget/tabwidget.pro b/examples/quick/customitems/tabwidget/tabwidget.pro
deleted file mode 100644
index b852bb4075..0000000000
--- a/examples/quick/customitems/tabwidget/tabwidget.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-SOURCES += main.cpp
-
-RESOURCES += tabwidget.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/customitems/tabwidget
-INSTALLS += target
diff --git a/examples/quick/customitems/tabwidget/tabwidget.qmlproject b/examples/quick/customitems/tabwidget/tabwidget.qmlproject
deleted file mode 100644
index e5a8bf02ca..0000000000
--- a/examples/quick/customitems/tabwidget/tabwidget.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "main.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/quick/customitems/tabwidget/tabwidget.qrc b/examples/quick/customitems/tabwidget/tabwidget.qrc
deleted file mode 100644
index ee71f677b1..0000000000
--- a/examples/quick/customitems/tabwidget/tabwidget.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- <file>TabWidget.qml</file>
- <file>doc/images/qml-tabwidget-example.png</file>
- <file>doc/images/tab.png</file>
- </qresource>
-</RCC>