Quantcast
Viewing all articles
Browse latest Browse all 4972

Change a QML state from a model role

Hello, I’m fairly new to Qt/QML. My question is if it’s possible to have a C++ model return a value that will change the state of a QML item. Something like: Rectangle {    id:myRect    state:myRoleReturned    states: [    .    .    .    ] } In this simplistic example, I would like a model to return a value that will change the state of this rectangle. I tried returning a QString, but it says “Unable to assign [undefined] to QString” Any ideas would help! Thank you very much for your time

Viewing all articles
Browse latest Browse all 4972

Trending Articles