I'm trying to use Columns and Rows to lay out my user interface.
import QtQuick 2.6
import QtQuick.Window 2.2
Window{
height: 200
width : 300
Row{
height: parent.height
width: parent.width
Column{
width: parent.width / 2
height: parent.height
Text{
text: "Hello World!"
}
Text{
wrapMode: Text.WordWrap
text: "This text is so long that it doesn't fit inside the column on a single line, but I'd assume that column sets child object width."
}
Rectangle{
height: parent.height - y
width: parent.width
color: "#aa0000aa"
Text{
anchors.bottom: parent.bottom
text: "Hello2"
}
}
}
Column{
height: parent.height
width: parent.width / 2
Text{
text: "Hello1"
}
Rectangle{
height: parent.height - y
color: "#4c00aa00"
width: parent.width
Text{
anchors.bottom: parent.bottom
text: "Hello2"
}
}
}
}
}
As can be seen, the text object width is not bound to it's parent.
For some reason I cannot use the layout qml objects since they lock up my target system.
Do I just need to pepper my code with width: parent.width
or is there some better way around this?