I have a list view in Qml with Text Input as one of the element. I used c++ model to inflate the list view . Now I want to change the C++ model if user enters any value in Text Input in qml.
How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to either create a slot in your model class and invoke it:
And invoke it from the qml delegate of that element when it has been edited like this:
You can also create methods that are Q_INVOKABLE and call them from QML the same way.