×
Namespaces

Variants
Actions
Revision as of 04:17, 11 October 2012 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to send a Qt app to the background on Symbian

From Nokia Developer 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
Compatibility
Platform(s):
Symbian
Article
Created: User:Wwwcitizen (10 Feb 2010)
Last edited: hamishwillee (11 Oct 2012)

Code

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();
mainWindow.showMaximized();
int rc = 0;
while (true)
{
rc = a.exec();
mainWindow.showMaximized();
RWindowGroup* wg = &CCoeEnv::Static()->RootWin();
wg->SetOrdinalPosition(-1);
}

You need following linkage in your .pro file

symbian { 
LIBS += -lws32\
-lcone
}
This page was last modified on 11 October 2012, at 04:17.
46 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.

×