Qml-为什么文本内容减少了?

时间:2019-01-05 04:08:12

标签: qt qml

代码是

import QtQuick 2.9
import QtQuick.Window 2.2

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")
    Text {
        id: name
        text: qsTr("cesssssssss")
        font.pointSize: 10.5
        font.family: "微软雅黑"
        topPadding: 10
        bottomPadding: 10
        horizontalAlignment: Text.AlignHCenter
        verticalAlignment: Text.AlignVCenter
    }
}

结果是

enter image description here

为什么字母c被截断? 如果我将font.pointSize更改为另一个值,它将显示正常。

0 个答案:

没有答案