Aka*_*wal 3 qml qtquickcontrols2
我TextArea在我的应用程序中添加了一个简单的。不幸的是,即使它contentHeight绕过了它的height.
这是代码:
import QtQuick 2.7
import QtQuick.Controls 2.0
ApplicationWindow {
id: appWindow
visible: true
width: 480
height: 640
TextArea{
anchors.fill: parent
anchors.margins: 100
wrapMode: TextEdit.Wrap
Component.onCompleted: {
console.log("width:", width)
console.log("contentWidth:", contentWidth)
console.log("height:", height)
console.log("contentHeight:", contentHeight)
}
onTextChanged: {
console.log("width:", width)
console.log("contentWidth:", contentWidth)
console.log("height:", height)
console.log("contentHeight:", contentHeight)
}
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3839 次 |
| 最近记录: |