PDA

View Full Version : sound option: on/off always return to default



shinichi7
21st January 2013, 10:31
i've created a qml file soundOption.qml



function toggle() {
if (soundOption.state == "on")
soundOption.state = "off"
else
soundOption.state = "on"
}


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" :mad:
i can only switch it on and off when i am on the same qml file...

in other qml file:


soundOption {
....
onClicked: soundOption.toggle()
}

pls help