----- anchors -----


https://doc.qt.io/qt-6/zh/qtquick-positioning-anchors.html

 属性 
import QtQuick
    
Item {
    //对齐
    anchors.centerIn: parent//水平垂直居中
    anchors.horizontalCenter: parent.horizontalCenter//水平居中
    anchors.verticalCenter: parent.verticalCenter//垂直居中
    anchors.top: parent.top
    anchors.bottom: parent.bottom
    anchors.left: parent.left
    anchors.right: parent.right
    
    //margin
    anchors.margins: real  //所有 margin(注意有 s)
    anchors.topMargin: real
    anchors.bottomMargin: real
    anchors.leftMargin: real
    anchors.rightMargin: real
    
    anchors.fill: parent  //填充父级或其他项目
    anchors.alignWhenCentered: bool
        //强制居中的锚点对齐到整个像素
        //可以确保项目绘制清晰
        //某些情况下需禁用,旋转项目时,由于中心变圆,可能会出现明显的抖动
        //默认 true
}