درود بر دوستان عزیز؛
چگونه میتوان Itemهایی که در ScrollView قرار دارند را وسطچین کرد ؟:
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
color: "gray"
ScrollView{
width: parent.width / 2; height: parent.height / 2
clip: true
anchors.centerIn: parent
Column{
Repeater{
model: 40
Rectangle{color: "red"; border.color: "yellow"; width: 80; height: 80}
}
}
}
}
در نمونهٔ بالا مثلاً میخواهم که تمامی Rectangleها در وسط ScrollView رندر بشوند.