aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/imageelements
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/imageelements')
-rw-r--r--examples/quick/imageelements/BorderImageSelector.qml (renamed from examples/quick/imageelements/content/BorderImageSelector.qml)8
-rw-r--r--examples/quick/imageelements/CMakeLists.txt116
-rw-r--r--examples/quick/imageelements/ImageCell.qml (renamed from examples/quick/imageelements/content/ImageCell.qml)9
-rw-r--r--examples/quick/imageelements/MyBorderImage.qml (renamed from examples/quick/imageelements/content/MyBorderImage.qml)6
-rw-r--r--examples/quick/imageelements/ShadowRectangle.qml (renamed from examples/quick/imageelements/content/ShadowRectangle.qml)6
-rw-r--r--examples/quick/imageelements/animatedimage.qml54
-rw-r--r--examples/quick/imageelements/animatedsprite.qml9
-rw-r--r--examples/quick/imageelements/borderimage.qml21
-rw-r--r--examples/quick/imageelements/doc/src/imageelements.qdoc2
-rw-r--r--examples/quick/imageelements/framestepping.qml9
-rw-r--r--examples/quick/imageelements/image.qml5
-rw-r--r--examples/quick/imageelements/imageelements.qml8
-rw-r--r--examples/quick/imageelements/imageelements.qrc34
-rw-r--r--examples/quick/imageelements/multiframeborderimage.qml9
-rw-r--r--examples/quick/imageelements/pics/BearSheet.png (renamed from examples/quick/imageelements/content/BearSheet.png)bin406337 -> 406337 bytes
-rw-r--r--examples/quick/imageelements/pics/Uniflow_steam_engine.gif (renamed from examples/quick/imageelements/content/Uniflow_steam_engine.gif)bin45328 -> 45328 bytes
-rw-r--r--examples/quick/imageelements/pics/arrow.png (renamed from examples/quick/imageelements/content/arrow.png)bin247 -> 247 bytes
-rw-r--r--examples/quick/imageelements/pics/bw.png (renamed from examples/quick/imageelements/content/bw.png)bin1357 -> 1357 bytes
-rw-r--r--examples/quick/imageelements/pics/colors-round.sci (renamed from examples/quick/imageelements/content/colors-round.sci)0
-rw-r--r--examples/quick/imageelements/pics/colors-stretch.sci (renamed from examples/quick/imageelements/content/colors-stretch.sci)0
-rw-r--r--examples/quick/imageelements/pics/colors.png (renamed from examples/quick/imageelements/content/colors.png)bin974 -> 974 bytes
-rw-r--r--examples/quick/imageelements/pics/multi.ico (renamed from examples/quick/imageelements/content/multi.ico)bin27110 -> 27110 bytes
-rw-r--r--examples/quick/imageelements/pics/qt-logo.png (renamed from examples/quick/imageelements/content/qt-logo.png)bin5149 -> 5149 bytes
-rw-r--r--examples/quick/imageelements/pics/shadow.png (renamed from examples/quick/imageelements/content/shadow.png)bin371 -> 371 bytes
-rw-r--r--examples/quick/imageelements/pics/speaker.png (renamed from examples/quick/imageelements/content/speaker.png)bin784525 -> 784525 bytes
-rw-r--r--examples/quick/imageelements/shadows.qml5
-rw-r--r--examples/quick/imageelements/spritesequence.qml24
27 files changed, 154 insertions, 171 deletions
diff --git a/examples/quick/imageelements/content/BorderImageSelector.qml b/examples/quick/imageelements/BorderImageSelector.qml
index d8c2101be7..76fbe38071 100644
--- a/examples/quick/imageelements/content/BorderImageSelector.qml
+++ b/examples/quick/imageelements/BorderImageSelector.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick
Item {
id: selector
@@ -66,7 +66,7 @@ Item {
curIdx += steps;
}
Image {
- source: "arrow.png"
+ source: "pics/arrow.png"
MouseArea{
anchors.fill: parent
onClicked: selector.advance(-1)
@@ -78,7 +78,7 @@ Item {
Behavior on opacity {NumberAnimation{}}
}
Image {
- source: "arrow.png"
+ source: "pics/arrow.png"
mirror: true
MouseArea{
anchors.fill: parent
diff --git a/examples/quick/imageelements/CMakeLists.txt b/examples/quick/imageelements/CMakeLists.txt
index 1ffb16694d..425e8933bd 100644
--- a/examples/quick/imageelements/CMakeLists.txt
+++ b/examples/quick/imageelements/CMakeLists.txt
@@ -1,13 +1,12 @@
# Generated from imageelements.pro.
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(imageelements 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")
@@ -15,89 +14,58 @@ endif()
set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quick/imageelements")
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
+find_package(Qt6 COMPONENTS Core Gui Quick Qml)
-qt_add_executable(imageelements
+add_subdirectory("../shared" "shared")
+
+qt_add_executable(imageelementsexample
+ WIN32
+ MACOSX_BUNDLE
main.cpp
)
-set_target_properties(imageelements PROPERTIES
- WIN32_EXECUTABLE TRUE
- MACOSX_BUNDLE TRUE
-)
-target_link_libraries(imageelements PUBLIC
+
+target_link_libraries(imageelementsexample PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
)
+qt_add_qml_module(imageelementsexample
+ URI imageelements
+ VERSION 1.0
+ QML_FILES
+ "animatedimage.qml"
+ "animatedsprite.qml"
+ "borderimage.qml"
+ "framestepping.qml"
+ "image.qml"
+ "imageelements.qml"
+ "multiframeborderimage.qml"
+ "shadows.qml"
+ "spritesequence.qml"
+ "BorderImageSelector.qml"
+ "ImageCell.qml"
+ "MyBorderImage.qml"
+ "ShadowRectangle.qml"
+ RESOURCES
+ "pics/qt-logo.png"
+ "pics/shadow.png"
+ "pics/speaker.png"
+ "pics/colors.png"
+ "pics/BearSheet.png"
+ "pics/Uniflow_steam_engine.gif"
+ "pics/arrow.png"
+ "pics/bw.png"
+ "pics/multi.ico"
+ "pics/colors-round.sci"
+ "pics/colors-stretch.sci"
+ )
-# Resources:
-set(imageelements_resource_files
- "animatedimage.qml"
- "animatedsprite.qml"
- "borderimage.qml"
- "content/BearSheet.png"
- "content/BorderImageSelector.qml"
- "content/ImageCell.qml"
- "content/MyBorderImage.qml"
- "content/ShadowRectangle.qml"
- "content/Uniflow_steam_engine.gif"
- "content/arrow.png"
- "content/bw.png"
- "content/colors-round.sci"
- "content/colors-stretch.sci"
- "content/colors.png"
- "content/multi.ico"
- "content/qt-logo.png"
- "content/shadow.png"
- "content/speaker.png"
- "framestepping.qml"
- "image.qml"
- "imageelements.qml"
- "multiframeborderimage.qml"
- "shadows.qml"
- "spritesequence.qml"
-)
-
-qt6_add_resources(imageelements "imageelements"
- PREFIX
- "/imageelements"
- FILES
- ${imageelements_resource_files}
-)
-set(shared_resource_files
- "../shared/Button.qml"
- "../shared/CheckBox.qml"
- "../shared/FlickrRssModel.qml"
- "../shared/Label.qml"
- "../shared/LauncherList.qml"
- "../shared/SimpleLauncherDelegate.qml"
- "../shared/Slider.qml"
- "../shared/TabSet.qml"
- "../shared/TextField.qml"
- "../shared/images/back.png"
- "../shared/images/checkmark.png"
- "../shared/images/next.png"
- "../shared/images/qt-logo.png"
- "../shared/images/slider_handle.png"
- "../shared/images/tab.png"
-)
-
-qt6_add_resources(imageelements "shared"
- PREFIX
- "/shared"
- BASE
- "../shared"
- FILES
- ${shared_resource_files}
-)
-
-install(TARGETS imageelements
+install(TARGETS imageelementsexample
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
+
+bundle_shared(imageelementsexample)
diff --git a/examples/quick/imageelements/content/ImageCell.qml b/examples/quick/imageelements/ImageCell.qml
index 7804346bd4..053afdde5d 100644
--- a/examples/quick/imageelements/content/ImageCell.qml
+++ b/examples/quick/imageelements/ImageCell.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -47,7 +47,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick
+import QtQuick.Controls
Item {
property alias mode: image.fillMode
@@ -56,11 +57,11 @@ Item {
Image {
id: image
width: parent.width; height: parent.height - captionItem.height
- source: "qt-logo.png"
+ source: "pics/qt-logo.png"
clip: true // only makes a difference if mode is PreserveAspectCrop
}
- Text {
+ Label {
id: captionItem
anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom
}
diff --git a/examples/quick/imageelements/content/MyBorderImage.qml b/examples/quick/imageelements/MyBorderImage.qml
index 3198de3bf1..5d11716a43 100644
--- a/examples/quick/imageelements/content/MyBorderImage.qml
+++ b/examples/quick/imageelements/MyBorderImage.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,8 +48,8 @@
**
****************************************************************************/
-import QtQml 2.0
-import QtQuick 2.0
+import QtQml
+import QtQuick
Item {
id: container
diff --git a/examples/quick/imageelements/content/ShadowRectangle.qml b/examples/quick/imageelements/ShadowRectangle.qml
index 7bce665b23..b112004fbc 100644
--- a/examples/quick/imageelements/content/ShadowRectangle.qml
+++ b/examples/quick/imageelements/ShadowRectangle.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick
Item {
property alias color : rectangle.color
@@ -58,7 +58,7 @@ Item {
anchors.fill: rectangle
anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
border { left: 10; top: 10; right: 10; bottom: 10 }
- source: "shadow.png"
+ source: "pics/shadow.png"
}
//! [shadow]
diff --git a/examples/quick/imageelements/animatedimage.qml b/examples/quick/imageelements/animatedimage.qml
index 04bc38fe95..11c41e3ae3 100644
--- a/examples/quick/imageelements/animatedimage.qml
+++ b/examples/quick/imageelements/animatedimage.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -47,8 +47,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 2.12
-import "../shared" as Examples
+import QtQuick
+import QtQuick.Controls
Column {
width: 320
@@ -59,7 +59,7 @@ Column {
//! [image]
AnimatedImage {
id: animation
- source: "content/Uniflow_steam_engine.gif"
+ source: "pics/Uniflow_steam_engine.gif"
anchors.horizontalCenter: parent.horizontalCenter
speed: speedSlider.value
TapHandler {
@@ -86,29 +86,43 @@ Column {
}
}
- Examples.Slider {
- id: speedSlider
- name: "Speed"
- min: 0
- max: 5
- init: 1
- width: 240
- x: animation.x
- Text {
+ Row {
+ spacing: 6
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Label {
+ text: qsTr("Speed:")
+ font.pointSize: 12
+ anchors.verticalCenter: speedSlider.verticalCenter
+ }
+
+ Slider {
+ id: speedSlider
+ from: 0
+ to: 5
+ value: 1
+ }
+
+ Label {
+ font: fontMetrics.font
+ text: qsTr(Math.round(animation.speed * 100) + "%")
+ width: fontMetrics.width
+ anchors.verticalCenter: speedSlider.verticalCenter
+ }
+
+ TextMetrics {
+ id: fontMetrics
+ text: "100%"
font.pointSize: 12
- text: Math.round(animation.speed * 100) + "%"
- x: animation.width - width
- anchors.verticalCenter: parent.verticalCenter
- anchors.margins: 6
}
}
- Examples.Button {
- text: "Reset"
+ Button {
+ text: qsTr("Reset")
enabled: speedSlider.value !== 1
anchors.horizontalCenter: parent.horizontalCenter
onClicked: {
- speedSlider.setValue(1)
+ speedSlider.value = 1
animation.playing = true
}
}
diff --git a/examples/quick/imageelements/animatedsprite.qml b/examples/quick/imageelements/animatedsprite.qml
index 8666c2b9fc..3a01eb427b 100644
--- a/examples/quick/imageelements/animatedsprite.qml
+++ b/examples/quick/imageelements/animatedsprite.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -47,7 +47,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick
+import QtQuick.Controls
Item {
width: 320
@@ -61,7 +62,7 @@ Item {
AnimatedSprite {
id: sprite
anchors.centerIn: parent
- source: "content/speaker.png"
+ source: "pics/speaker.png"
frameCount: 60
frameSync: true
frameWidth: 170
@@ -70,7 +71,7 @@ Item {
}
//! [sprite]
- Text {
+ Label {
text: "Left click to resume\nMiddle click to advance backward\nRight click to advance forward"
visible: sprite.paused
}
diff --git a/examples/quick/imageelements/borderimage.qml b/examples/quick/imageelements/borderimage.qml
index 00f18737f6..15fe32ed9f 100644
--- a/examples/quick/imageelements/borderimage.qml
+++ b/examples/quick/imageelements/borderimage.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,8 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.0
-import "content"
+import QtQuick
Rectangle {
id: page
@@ -81,47 +80,47 @@ Rectangle {
MyBorderImage {
minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
+ source: "pics/colors.png"; margin: 30
}
MyBorderImage {
minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
+ source: "pics/colors.png"; margin: 30
horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
}
MyBorderImage {
minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
+ source: "pics/colors.png"; margin: 30
horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
}
MyBorderImage {
minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
+ source: "pics/colors.png"; margin: 30
horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
}
MyBorderImage {
minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
+ source: "pics/bw.png"; margin: 10
}
MyBorderImage {
minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
+ source: "pics/bw.png"; margin: 10
horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
}
MyBorderImage {
minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
+ source: "pics/bw.png"; margin: 10
horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
}
MyBorderImage {
minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
+ source: "pics/bw.png"; margin: 10
horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
}
}
diff --git a/examples/quick/imageelements/doc/src/imageelements.qdoc b/examples/quick/imageelements/doc/src/imageelements.qdoc
index 4c00915e56..90cb2c4d2e 100644
--- a/examples/quick/imageelements/doc/src/imageelements.qdoc
+++ b/examples/quick/imageelements/doc/src/imageelements.qdoc
@@ -49,7 +49,7 @@
\e Shadows shows how to create a drop shadow effect for a rectangular item
using a \l BorderImage:
- \snippet imageelements/content/ShadowRectangle.qml shadow
+ \snippet imageelements/ShadowRectangle.qml shadow
\section1 Sprite Animations with AnimatedSprite
diff --git a/examples/quick/imageelements/framestepping.qml b/examples/quick/imageelements/framestepping.qml
index f5bad46e7b..a536bb28d8 100644
--- a/examples/quick/imageelements/framestepping.qml
+++ b/examples/quick/imageelements/framestepping.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.14
+import QtQuick
+import QtQuick.Controls
Rectangle {
width: 480
@@ -57,7 +58,7 @@ Rectangle {
id: img
anchors.centerIn: parent
cache: true
- source: "content/multi.ico"
+ source: "pics/multi.ico"
Shortcut {
sequence: StandardKey.MoveToNextPage
@@ -71,7 +72,7 @@ Rectangle {
}
}
- Text {
+ Label {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.margins: 6
diff --git a/examples/quick/imageelements/image.qml b/examples/quick/imageelements/image.qml
index 0750ea3b79..d4040e0be0 100644
--- a/examples/quick/imageelements/image.qml
+++ b/examples/quick/imageelements/image.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,8 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.0
-import "content"
+import QtQuick
Rectangle {
width: 320
diff --git a/examples/quick/imageelements/imageelements.qml b/examples/quick/imageelements/imageelements.qml
index 91f2e034f7..74fb36c5bb 100644
--- a/examples/quick/imageelements/imageelements.qml
+++ b/examples/quick/imageelements/imageelements.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,13 +48,13 @@
**
****************************************************************************/
-import QtQuick 2.0
-import "../shared"
+import QtQuick
+import shared as Shared
Item {
height: 480
width: 320
- LauncherList {
+ Shared.LauncherList {
id: ll
anchors.fill: parent
Component.onCompleted: {
diff --git a/examples/quick/imageelements/imageelements.qrc b/examples/quick/imageelements/imageelements.qrc
index cedef2204c..62f2bbfc76 100644
--- a/examples/quick/imageelements/imageelements.qrc
+++ b/examples/quick/imageelements/imageelements.qrc
@@ -1,28 +1,28 @@
<RCC>
<qresource prefix="/imageelements">
- <file>content/arrow.png</file>
- <file>content/BearSheet.png</file>
- <file>content/BorderImageSelector.qml</file>
- <file>content/bw.png</file>
- <file>content/colors-round.sci</file>
- <file>content/colors-stretch.sci</file>
- <file>content/colors.png</file>
- <file>content/ImageCell.qml</file>
- <file>content/multi.ico</file>
- <file>content/MyBorderImage.qml</file>
- <file>content/qt-logo.png</file>
- <file>content/shadow.png</file>
- <file>content/ShadowRectangle.qml</file>
- <file>content/speaker.png</file>
- <file>content/Uniflow_steam_engine.gif</file>
- <file>imageelements.qml</file>
<file>animatedimage.qml</file>
<file>animatedsprite.qml</file>
<file>borderimage.qml</file>
+ <file>BorderImageSelector.qml</file>
<file>framestepping.qml</file>
- <file>multiframeborderimage.qml</file>
+ <file>ImageCell.qml</file>
+ <file>imageelements.qml</file>
<file>image.qml</file>
+ <file>multiframeborderimage.qml</file>
+ <file>MyBorderImage.qml</file>
+ <file>ShadowRectangle.qml</file>
<file>shadows.qml</file>
<file>spritesequence.qml</file>
+ <file>pics/arrow.png</file>
+ <file>pics/BearSheet.png</file>
+ <file>pics/bw.png</file>
+ <file>pics/colors-round.sci</file>
+ <file>pics/colors-stretch.sci</file>
+ <file>pics/colors.png</file>
+ <file>pics/multi.ico</file>
+ <file>pics/qt-logo.png</file>
+ <file>pics/shadow.png</file>
+ <file>pics/speaker.png</file>
+ <file>pics/Uniflow_steam_engine.gif</file>
</qresource>
</RCC>
diff --git a/examples/quick/imageelements/multiframeborderimage.qml b/examples/quick/imageelements/multiframeborderimage.qml
index 0805ea4243..d3a64d88d1 100644
--- a/examples/quick/imageelements/multiframeborderimage.qml
+++ b/examples/quick/imageelements/multiframeborderimage.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,7 +48,8 @@
**
****************************************************************************/
-import QtQuick 2.14
+import QtQuick
+import QtQuick.Controls
Rectangle {
width: 480
@@ -58,7 +59,7 @@ Rectangle {
anchors.fill: parent
anchors.margins: 6
cache: true
- source: "content/multi.ico"
+ source: "pics/multi.ico"
border { left: 19; top: 19; right: 19; bottom: 19 }
horizontalTileMode: BorderImage.Stretch
@@ -74,7 +75,7 @@ Rectangle {
}
}
- Text {
+ Label {
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
text: "frame " + (img.currentFrame + 1) + " of " + img.frameCount +
diff --git a/examples/quick/imageelements/content/BearSheet.png b/examples/quick/imageelements/pics/BearSheet.png
index a084bf0f1e..a084bf0f1e 100644
--- a/examples/quick/imageelements/content/BearSheet.png
+++ b/examples/quick/imageelements/pics/BearSheet.png
Binary files differ
diff --git a/examples/quick/imageelements/content/Uniflow_steam_engine.gif b/examples/quick/imageelements/pics/Uniflow_steam_engine.gif
index 8754de4af9..8754de4af9 100644
--- a/examples/quick/imageelements/content/Uniflow_steam_engine.gif
+++ b/examples/quick/imageelements/pics/Uniflow_steam_engine.gif
Binary files differ
diff --git a/examples/quick/imageelements/content/arrow.png b/examples/quick/imageelements/pics/arrow.png
index 059be6294e..059be6294e 100644
--- a/examples/quick/imageelements/content/arrow.png
+++ b/examples/quick/imageelements/pics/arrow.png
Binary files differ
diff --git a/examples/quick/imageelements/content/bw.png b/examples/quick/imageelements/pics/bw.png
index 486eaae96e..486eaae96e 100644
--- a/examples/quick/imageelements/content/bw.png
+++ b/examples/quick/imageelements/pics/bw.png
Binary files differ
diff --git a/examples/quick/imageelements/content/colors-round.sci b/examples/quick/imageelements/pics/colors-round.sci
index 506f6f5f99..506f6f5f99 100644
--- a/examples/quick/imageelements/content/colors-round.sci
+++ b/examples/quick/imageelements/pics/colors-round.sci
diff --git a/examples/quick/imageelements/content/colors-stretch.sci b/examples/quick/imageelements/pics/colors-stretch.sci
index e4989a723c..e4989a723c 100644
--- a/examples/quick/imageelements/content/colors-stretch.sci
+++ b/examples/quick/imageelements/pics/colors-stretch.sci
diff --git a/examples/quick/imageelements/content/colors.png b/examples/quick/imageelements/pics/colors.png
index 57f5aca821..57f5aca821 100644
--- a/examples/quick/imageelements/content/colors.png
+++ b/examples/quick/imageelements/pics/colors.png
Binary files differ
diff --git a/examples/quick/imageelements/content/multi.ico b/examples/quick/imageelements/pics/multi.ico
index b748ceaa29..b748ceaa29 100644
--- a/examples/quick/imageelements/content/multi.ico
+++ b/examples/quick/imageelements/pics/multi.ico
Binary files differ
diff --git a/examples/quick/imageelements/content/qt-logo.png b/examples/quick/imageelements/pics/qt-logo.png
index 14ddf2a028..14ddf2a028 100644
--- a/examples/quick/imageelements/content/qt-logo.png
+++ b/examples/quick/imageelements/pics/qt-logo.png
Binary files differ
diff --git a/examples/quick/imageelements/content/shadow.png b/examples/quick/imageelements/pics/shadow.png
index 23c011d0ff..23c011d0ff 100644
--- a/examples/quick/imageelements/content/shadow.png
+++ b/examples/quick/imageelements/pics/shadow.png
Binary files differ
diff --git a/examples/quick/imageelements/content/speaker.png b/examples/quick/imageelements/pics/speaker.png
index fb0e857859..fb0e857859 100644
--- a/examples/quick/imageelements/content/speaker.png
+++ b/examples/quick/imageelements/pics/speaker.png
Binary files differ
diff --git a/examples/quick/imageelements/shadows.qml b/examples/quick/imageelements/shadows.qml
index 981133f725..8fea9250bc 100644
--- a/examples/quick/imageelements/shadows.qml
+++ b/examples/quick/imageelements/shadows.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -48,8 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.0
-import "content"
+import QtQuick
Rectangle {
id: window
diff --git a/examples/quick/imageelements/spritesequence.qml b/examples/quick/imageelements/spritesequence.qml
index 8581bf1ea8..a047b22fbc 100644
--- a/examples/quick/imageelements/spritesequence.qml
+++ b/examples/quick/imageelements/spritesequence.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -47,7 +47,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 2.0
+import QtQuick
Item {
width: 320
@@ -73,9 +73,9 @@ Item {
interpolate: false
goalSprite: ""
//! [still]
- Sprite{
+ Sprite {
name: "still"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 1
frameWidth: 256
frameHeight: 256
@@ -83,9 +83,9 @@ Item {
to: {"still":1, "blink":0.1, "floating":0}
}
//! [still]
- Sprite{
+ Sprite {
name: "blink"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 3
frameX: 256
frameY: 1536
@@ -94,9 +94,9 @@ Item {
frameDuration: 100
to: {"still":1}
}
- Sprite{
+ Sprite {
name: "floating"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 9
frameX: 0
frameY: 0
@@ -105,9 +105,9 @@ Item {
frameDuration: 160
to: {"still":0, "flailing":1}
}
- Sprite{
+ Sprite {
name: "flailing"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 8
frameX: 0
frameY: 768
@@ -116,9 +116,9 @@ Item {
frameDuration: 160
to: {"falling":1}
}
- Sprite{
+ Sprite {
name: "falling"
- source: "content/BearSheet.png"
+ source: "pics/BearSheet.png"
frameCount: 5
frameY: 1280
frameWidth: 256