1
我有一個TextArea。如果我設置填充不斷填充正常工作。QML TextArea奇怪的填充
import QtQuick 2.9
import QtQuick.Controls 2.2
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
TextArea{
font.pixelSize: 20
anchors.fill: parent
wrapMode: TextArea.Wrap
leftPadding: 100 //*parent.width/640
rightPadding: 100 //*parent.width/640
}
}
如果我取消註釋上面的行,那麼我有奇怪的行爲。 我在做什麼錯?
截圖