Как в Rowlayout или ColumnLayout центрировать элемент и держать их в порядке, поэтому независимо от масштаба первого объекта второй всегда будет после него.
ColumnLayout {
id: currentMusicRow
anchors.horizontalCenterOffset: wrapper.width / -4.5
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 20
Rectangle {
id: currentPicBackground
x: 273
y: 20
width: 260
height: 260
color: "#151515"
Layout.alignment: parent.AlignHCenter
Image {
id: currentMusicPic
x: 2
y: 2
anchors.fill: parent
anchors.margins: 2
source: "images/maxresdefault.jpg"
fillMode: Image.Stretch
}
}
RowLayout {
id: titleMusicLayout
width: 222
height: 29
Layout.horizontalCenter: parent.AlignCenter
Layout.bottomMargin: -50
Layout.bottom: currentPicBackground.AlignBottom
Text {
id: band
width: 155
height: 28
color: "#f2f2f2"
text: qsTr("Glad Boris")
font.italic: false
font.weight: Font.Medium
style: Text.Normal
font.underline: false
font.family: "Acme"
font.bold: false
font.pixelSize: 22
MouseArea {
id: bandMouseArea
width: 123
height: 28
anchors.centerIn: parent
hoverEnabled: true
}
}
Text {
id: diveder
width: 13
height: 28
color: "#f2f2f2"
text: "/"
font.bold: false
font.pixelSize: 22
font.family: "Tahoma"
}
Text {
id: musicName
width: 103
height: 28
color: "#f2f2f2"
text: "relaxation"
font.weight: Font.Light
font.bold: false
font.pixelSize: 20
font.family: "Acme"
MouseArea {
id: musicNameMouseArea
width: 103
height: 28
anchors.centerIn: parent
hoverEnabled: true
}
}
Это показывает ошибку, потому что я установил множественное выравниваниено мне нужно каким-то образом держать свои тексты (внутри RowLayout) ниже, чем мой прямоугольник / изображение (внутри ColumnLayout), ДАЖЕ, ЕСЛИ ИЗОБРАЖЕНИЕ БОЛЬШЕ УВЕЛИЧЕНО (тексты должны быть зафиксированы в нижней части).