So I have been trying for weeks to simply get my text to wrap when it gets to to end of the rectangle. I have tried loads of things and this snippet is just the latest. Even if I use Layout ONLY and drop the "anchor" it does not do word wrapping, instead the text looks like the width is not set. Even if I force the rectangle and text width it just gets ignored.
var elem = '
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
RowLayout {
id: rowlayout
//anchors.fill: parent
Layout.minimumHeight: 100
Layout.preferredHeight: 100
Layout.maximumHeight: 100
spacing: 6
Rectangle {
id: element_one_rect
color: "'+active+'"
Layout.fillWidth: true
Layout.minimumWidth: root.width * 0.25
Layout.preferredWidth: root.width * 0.25
Layout.maximumWidth: root.width * 0.25
Layout.minimumHeight: 100
Layout.margins: 10
Text {
anchors.centerIn: parent
text: "'+description+'"
color: "'+color+'"
font.weight: Font.DemiBold
}
}
Rectangle {
color: "'+active+'"
Layout.fillWidth: true
Layout.minimumWidth: root.width * 0.72
Layout.preferredWidth: root.width * 0.72
Layout.preferredHeight: 100
Layout.margins: 10
Text {
anchors.centerIn: parent
text: "'+data+'"
color: "'+color+'"
font.weight: Font.Bold
//wrapMode: Text.WordWrap
wrapMode: Text.WrapAnywhere
}
}
}';