سؤال

I made a game for symbian^3 with QML . and I stumbled upon one problem. I don't know how to pause my game when the game is go to background (e.g : home button pressed) . especially the music. it cannot stop playing at all. I tried to use (status == PageStatus.Inactive) but it have no use. is there any workaround to do this through QML?

هل كانت مفيدة؟

المحلول

Use Qt.application.active to check whether your application is in the foreground or not.

More information can be found here.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top