我有点困惑..。我发现文本的anchors.baseline和矩形的不一样。为什么?基线的定义是什么?谢谢..。
Item {
width: 400; height: 200
Rectangle {
y:20
id: rectangle
width: 80; height: 80
color: "red"
}
Text {
text: "Hello World!"
anchors.baseline: rectangle.baseline
anchors.left: rectangle.right
}
}

矩形的基线在顶部,文本的基线在底部?
发布于 2012-02-25 09:35:15
基线对应于文本所处的假想线。对于没有文本的项目,它与顶部相同。
https://stackoverflow.com/questions/9440534
复制相似问题