summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2016-08-19 13:25:49 +0200
committerAlessandro Portale <alessandro.portale@qt.io>2016-08-23 12:13:07 +0000
commit63ec7e2ff9f5f63ff32c1fb874fd7de8b5bfdb02 (patch)
tree051c0675ca058e08759e84d8de9d1c204312fb49
parenta3bfb9e792e4a8dd5f16a4b51d45c3af0eaae80d (diff)
TrafficLight example: Use relative image file names in .qml examplesv5.7.1
It is not just better practice to reduce the absolute source file names to a minimum, but in this case it also enables the Qt Quick Designer to properly display the scene. Change-Id: I0be935584687c5f5099619ffe9c0e356d0b4d56b Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
-rw-r--r--examples/scxml/trafficlight-common/TrafficLight.qml10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/scxml/trafficlight-common/TrafficLight.qml b/examples/scxml/trafficlight-common/TrafficLight.qml
index 03eac30..a23fca7 100644
--- a/examples/scxml/trafficlight-common/TrafficLight.qml
+++ b/examples/scxml/trafficlight-common/TrafficLight.qml
@@ -62,7 +62,7 @@ Window {
Image {
id: lights
- source: "qrc:///background.png"
+ source: "background.png"
MouseArea {
anchors.fill: parent
@@ -75,7 +75,7 @@ Window {
id: redLight
x: (lights.width - width) / 2
y: 40
- source: "qrc:///red.png"
+ source: "red.png"
visible: stateMachine.red || stateMachine.redGoingGreen
}
@@ -83,7 +83,7 @@ Window {
id: yellowLight
x: (lights.width - width) / 2
y: 135
- source: "qrc:///yellow.png"
+ source: "yellow.png"
visible: stateMachine.yellow || stateMachine.blinking
}
@@ -91,7 +91,7 @@ Window {
id: greenLight
x: (lights.width - width) / 2
y: 230
- source: "qrc:///green.png"
+ source: "green.png"
visible: stateMachine.green
}
}
@@ -102,7 +102,7 @@ Window {
anchors.bottom: parent.bottom
anchors.margins: 20
- source: stateMachine.working ? "qrc:///pause.png" : "qrc:///play.png"
+ source: stateMachine.working ? "pause.png" : "play.png"
onClicked: {
if (stateMachine.working)