[SOLVE]Quiting Problem
-
Hi. I rewrite my codes again and i just noticed something.. I guess it was my problem before and I believed I am stuck with this for a while I forgot to check on this..
I have a mouseArea on exitIcon... this, obviously quits the game..
but... let's say when I clicked on the playIcon.. this will load another qml file and start the game proper.. but whenever i intentionally click on the spot or area where the exitIcon has been previously positioned.. the MouseArea with Quit function still works.. How would i disable it??
@ Image{
id:exitIcon
x: 12
y: -183
fillMode: Image.PreserveAspectFit
source:"images/menu/exit.png"
MouseArea{
anchors.fill: parent
onClicked: {
MouseArea.enabled=false
onExitClicked:Qt.quit()
}} }
@
-
@MouseArea{
id:exit
anchors.fill: parent
onClicked: {
MouseArea.enabled=false;
onExitClicked:Qt.quit();
MouseArea.visible = false;
}@try this maybe it needs ; on each statement ^^
i only stated MouseArea.visible = false on every mousearea i click to hide it.