What happens to a minimized application?



  • When you minimize an application, does the main-thread "pause" or anything like that? I'm primarily asking because I've made a program that I want to be fully functional and keep doing what it's doing, even when minimized, but a few users of the program reported it not working correctly after they have minimized it.


  • Moderators

    @Kayote

    You are asking a pretty general question which is not really dependent on Qt. There are parameters not targeted by Qt, which do play the major roles.
    Those parameters are device, device type and OS and probably an even longer list.



  • @koahnig Yeah I know it's not dependant on Qt, however I haven't been able to find any details about this and just thought I'd ask here. My application is for Windows and I was just wondering if there was anything I could do to make sure my code still runs when it's minimized.


  • Moderators

    For classic desktop Windows application there's no general change in how the app behaves. It just receives changeEvent of type QEvent::WindowStateChange. The focus is also lost if the app had it before minimizing. Otherwse it's business as usual.

    The Windows Runtime apps (e.g. UWP) behave differently. They are suspended/resumed and they can make use of background tasks to do stuff when the app is suspended.

    Here are some resources for other platforms: Android, iOS


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.