Update a text object in Qml from C++
Solved
QML and Qt Quick
-
I have a very basic main.qml file that I want to update from the main.cpp file. The qml file looks like this
Window { width: 1920 height: 1080 visible: true color: "#000000" visibility: Window.FullScreen Text { id: example_text x: 82 y: 322 color: "#ffffff" text: qsTr("text_to_edit") font.pixelSize: 64 font.family: "IBM Plex Mono" } }
I found this post which involves a second qml file as component, which I have tried, but I can't create the objectName attribute. Can I somehow reference this by the id?
-
-
Thanks, I just wanted to clarify my question, because I thought it was lacking details. With the help of the provided post, I managed to create an updater thread to update my values. :)