aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/imageelements/borderimage.qml
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-06-17 08:21:04 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2021-06-17 14:20:01 +0200
commit07d646d1b06c865724a07c9af1b7c734d04df7e5 (patch)
treeff02cdce516149cae51e541f37113e29006390c8 /examples/quick/imageelements/borderimage.qml
parent803a5fda05832b139cc1d76b666777491c708a96 (diff)
Update imageelements example to Qt 6 url syntax
The imageelements examples depended on URLs being resolved relative to the file where it was declared, but in Qt 6 this was changed. Since the source is actually resolved inside MyBorderImage, which is in content/, we would end up trying to resolve content/content/foo.png. To avoid having code depend on the location of types it is using, URLs have to be packed in Qt.resolvedUrl() in Qt 6. Change-Id: I16e203e92b3b4c7c573dcdb85dcd556f2103ab80 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/quick/imageelements/borderimage.qml')
-rw-r--r--examples/quick/imageelements/borderimage.qml16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/quick/imageelements/borderimage.qml b/examples/quick/imageelements/borderimage.qml
index 00f18737f6..bce30951e7 100644
--- a/examples/quick/imageelements/borderimage.qml
+++ b/examples/quick/imageelements/borderimage.qml
@@ -81,47 +81,47 @@ Rectangle {
MyBorderImage {
minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
+ source: Qt.resolvedUrl("content/colors.png"); margin: 30
}
MyBorderImage {
minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 200
- source: "content/colors.png"; margin: 30
+ source: Qt.resolvedUrl("content/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: Qt.resolvedUrl("content/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: Qt.resolvedUrl("content/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: Qt.resolvedUrl("content/bw.png"); margin: 10
}
MyBorderImage {
minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200
- source: "content/bw.png"; margin: 10
+ source: Qt.resolvedUrl("content/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: Qt.resolvedUrl("content/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: Qt.resolvedUrl("content/bw.png"); margin: 10
horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
}
}