c++ - How to completely close the window in qt? -


i creating game using c++ , qt creator. when health gets below zero, want quit current application , show different screen displays quit or play again.

i can using hide() method , showing new screen show() method.

however, if while game still running in background, can still hear music playing though hidden. main problem when click play again button , loads game again in new window, score , health affected what's still going on in old game have hidden.

is there way can close window quits game still loads next window want to?

delete window instance , create new 1 next game. or keep , implement proper application states control things music off when game not in running state.


Popular posts from this blog