CuteHMI - Piping Example (CuteHMI.Examples.Symbols.Pipes.Piping.2)
Piping example

This example shows how to use piping components provided by CuteHMI.Symbols.Pipes.1 extension.

To run the example use cutehmi.view.4 tool.

cutehmi.view.4 CuteHMI.Examples.Symbols.Pipes.Piping.2

A remark on Qt Creator.

Pipe {
from: red.outlet
to: blue.inlet
color.interior: ["red", "blue"]
}

Qt Creator may refuse to render this pipe in "Design" mode. PipeConnector objects are created within named properties of red and blue rectangles.

property PipeConnector outlet: PipeConnector {
x: 40
y: 20
parent: red
}

It comes out Qt Creator has troubles with such bindings if component is defined inplace. It would render pipe correctly however, if rectangles were defined in separate QML files. Thus if one wants to use PipeConnector objects as item properties with Qt Creator in "Design" mode, he has to pack such code into custom QML component. For example red rectangle code below could be moved to RedRectangle.qml file.

Rectangle {
id: red
x: 400
y: 20
width: 40
height: 40
color: "red"
border.width: 1
property PipeConnector outlet: PipeConnector {
x: 40
y: 20
parent: red
}
}