Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
how create dynamically Qml file(.qml) from c++ ?
paghsa last edited by
I face to a problem that i couldn't find a good solution for that.
lets suppose that I have some types of value in c++ and according to these variables I should create a qml file dynamically.
for exmaple if i have three integer and a string i should create a qml file which is suitable according what I need.
or if i have different type of value with different count i should create another qml file that matches to my data from c++.
I have no idea for doing this
any help will be appreciated.
Treat the qml content as string. Just build the string dynamically. See the documentation Qt.createQmlObject. You will get an input.