Solved How to refer to a value in a text in QML List Element
-
Hi,
I have a list element like this:ListElement { type: "boolean" label: "Change the option" func3text: "OFF" func3subtext: "The change is disabled" func4text: "ON" func4subtext: "The change is enabled for (some value)" target: "value" }
How can I write
func4subtext: ("The change is enabled for %d", value)as we write in C++, to refer to a changing value in a text
-
I don't think you will be able to do like this. Based on some condition get the existing values using get(..) method and set value back. This is the only option I feel.
-
Thank you!
How can get() method be used,? -
var el = id.get(index) where id is identity property of model object. Refer Qt Assistant as well.
-
Alright!
Solved, thank you!