Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

How to send a Qt app to the background on Symbian

From Wiki
Jump to: navigation, search

This code snippet demonstrates how to hide a Qt application in the background on Symbian, instead of allowing it to exit.

Article Metadata
Created: User:Wwwcitizen (10 Feb 2010)
Last edited: hamishwillee (11 Oct 2012)


The way it works is that when the application is exited the exec() completes, and the app window is forced into the background and then re-executed. Symbian C++ code is used to force the app into the background.

Source file:

    MainWindow mainWindow();
int rc = 0;
while (true)
rc = a.exec();
RWindowGroup* wg = &CCoeEnv::Static()->RootWin();

You need following linkage in your .pro file

symbian { 
LIBS += -lws32\
This page was last modified on 11 October 2012, at 01:17.
39 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.