Change QML item property in c++ code
at the moment I am working on my first QML/QtQuick project. I create a forumlar / UI with some text items and textedit items. How can I change the content of the textedit item in my c++ code?
Thank you for your help.
Its described here
I think you are looking for the section with
QQuickItem item = qobject_cast<QQuickItem>(object);
ok I found it. That meens that I have to create a new QQuickItem for every item, which I want to change it?
I want to change a item with a id, so I think I need this one?
QObject rect = object->findChild<QObject>("rect");
The sample you shown searches for QObject named "rect"
So yes, you would search for all this way but you can use a function wrapper so its