i've created a qml file soundOption.qml
function toggle() {
if (soundOption.state == "on")
soundOption.state = "off"
else
soundOption.state = "on"
}
function toggle() {
if (soundOption.state == "on")
soundOption.state = "off"
else
soundOption.state = "on"
}
To copy to clipboard, switch view to plain text mode
when accessing to other qml, it is always in default setup.
default is "on", then i switched it to "off"
when i am on other qml and i want it to switch back "on", it was already "on" 
i can only switch it on and off when i am on the same qml file...
in other qml file:
soundOption {
....
onClicked: soundOption.toggle()
}
soundOption {
....
onClicked: soundOption.toggle()
}
To copy to clipboard, switch view to plain text mode
pls help
Bookmarks