If I have the following code:
import QtQuick 2.10
import QtQuick.Window 2.10
Window {
id: app
visible: true
width: 640
height: 480
property bool txt: false
Text {
text: app.txt
onTextChanged: { console.debug("Text changed") }
}
}
I get “Text changed” displayed in my console as soon as the app loads, however if I set the text manually to something like
Text {
text: "Some text"
onTextChanged: { console.debug("Text changed") }
}
I don’t get the “Text changed” display in my console unless I actually have something that changes the text after the app loads.
Is this normal behaviour? Is there a way to use the variable as the text but not have onTextChanged activate as soon as the app loads?