Here is a complete listing of the example source file.
import QtQuick 2.11
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
Rectangle {
id: root
anchors.fill: parent
color: Theme.palette.background
x: 20
y: 20
}
x: 200
y: 20
}
}
id: verticalA
x: 300
y: 20
}
id: verticalB
x: 300
y: 200
}
from: verticalA
to: verticalB
}
Rectangle {
id: red
x: 400
y: 20
width: 40
height: 40
color: "red"
border.width: 1
x: 40
y: 20
parent: red
}
}
Rectangle {
id: blue
x: 600
y: 20
width: 40
height: 40
color: "blue"
border.width: 1
x: 0
y: 20
parent: blue
}
}
from: red.outlet
to: blue.inlet
color.interior: ["red", "blue"]
}
Rectangle {
id: green
x: 700
y: 20
width: 40
height: 40
color: "green"
border.width: 1
rotation: 90
x: 40
y: 20
parent: green
}
}
Rectangle {
id: orange
x: 700
y: 200
width: 40
height: 40
color: "orange"
border.width: 1
rotation: 90
x: 0
y: 20
parent: orange
}
}
from: green.outlet
to: orange.inlet
color.interior: ["green", "orange"]
}
id: tee
x: 100
y: 300
color.interior: "yellow"
}
id: teeFlip
x: 200
y: 300
rotation: 180
color.interior: "yellow"
}
id: elbow
x: 300
y: 300
color.interior: "yellow"
}
id: elbow90
x: 300
y: 400
rotation: 90
color.interior: "yellow"
}
id: elbow180
x: 100
y: 400
rotation: 180
color.interior: "yellow"
}
id: leftEnd
x: 20
y: 300
color.interior: "yellow"
}
id: topEnd
x: 200
y: 250
rotation: 90
color.interior: "yellow"
}
from: leftEnd.connector.sideB
to: tee.connector.sideA
color.interior: "orange"
}
from: tee.connector.sideB
to: teeFlip.connector.sideB
color.interior: "orange"
}
from: teeFlip.connector.sideA
to: elbow.connector.sideA
color.interior: "orange"
}
from: elbow.connector.sideB
to: elbow90.connector.sideA
color.interior: "orange"
}
from: elbow90.connector.sideB
to: elbow180.connector.sideA
color.interior: "orange"
}
from: elbow180.connector.sideB
to: tee.connector.middle
color.interior: "orange"
}
from: teeFlip.connector.middle
to: topEnd.connector.sideB
color.interior: "orange"
}
id: tee_2
x: 400
y: 300
color.interior: "pink"
}
id: teeFlip_2
x: 500
y: 300
rotation: 180
color.interior: "pink"
}
id: elbow_2
x: 600
y: 300
color.interior: "pink"
}
id: elbow90_2
x: 600
y: 400
rotation: 90
color.interior: "pink"
}
id: elbow180_2
x: 400
y: 400
rotation: 180
color.interior: "pink"
}
id: leftEnd_2
x: 320
y: 300
color.interior: "pink"
}
id: topEnd_2
x: 500
y: 250
rotation: 90
color.interior: "pink"
}
id: topCap_2
x: 500
y: 200
color.interior: "pink"
rotation: -90
}
from: leftEnd_2.connector
to: tee_2.connector
color.interior: "violet"
}
from: tee_2.connector
to: teeFlip_2.connector
color.interior: "violet"
}
from: teeFlip_2.connector
to: elbow_2.connector
color.interior: "violet"
}
from: elbow_2.connector
to: elbow90_2.connector
color.interior: "violet"
}
from: elbow90_2.connector
to: elbow180_2.connector
color.interior: "violet"
}
from: elbow180_2.connector
to: tee_2.connector
color.interior: "violet"
}
from: teeFlip_2.connector
to: topEnd_2.connector
color.interior: "violet"
}
from: topEnd_2.connector
to: topCap_2.connector
color.interior: "violet"
}
}