import QtQuick 2.15 Rectangle { function onTextChanging(){ let str = xText.getText(0, xText.text.length) console.log(str) } TextEdit{ id: xText height:300 width: 500 textFormat:TextEdit.RichText onTextChanged: onTextChanging() } }