import QtQuick 2.9 import QtQuick.Controls 2.4 import QtQuick.Window 2.2 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Text{ id: text0 x:100 y:100 width: 200 height: text0.contentHeight wrapMode: Text.WordWrap text: '' onTextChanged: { console.log("contentHeight and height are:"+contentHeight+","+height); } } Button{ x: 0 y: 0 text: "Test the bug!" onPressed: { text0.text="some words..."; } } }