Solved How do you set a margin for Text Elements within A column within a Row?
-
I'm brand new to Qml and trying to sort through a margin issue. I wish to set a margin to push the Text elements away from the image. AppImage is a Felgo SDK enhancement of image. I would presume I could set the margin with the Text element with an anchors.leftMargin but that doesn't seem to work.
delegate: Rectangle { width: parent.width; height: 100 Row { AppImage { id: id fillMode: Image.PreserveAspectFit source: "https://via.placeholder.com/80" } Column { spacing: 5 Text { text: title wrapMode: Text.WordWrap } Text { text: someValue} Text { text: someValue2} } } }
-
https://doc.qt.io/qt-5/qml-qtquick-row.html#spacing-prop
delegate: Rectangle { width: parent.width; height: 100 Row { spacing: 50 <======== AppImage { id: id fillMode: Image.PreserveAspectFit source: "https://via.placeholder.com/80" } Column { spacing: 5 Text { text: title wrapMode: Text.WordWrap } Text { text: someValue} Text { text: someValue2} } } }
-
@Nifiro said in How do you set a margin for Text Elements within A column within a Row?:
spacing: 50
Thanks! Couldn't see the forest for the trees. :)