How to send a Qt app to the background on Symbian
This code snippet demonstrates how to hide a Qt application in the background on Symbian, instead of allowing it to exit.
Article Metadata
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 code is working fine. I have implemented it and putting details here. by Dalason
I made changes
symbian: {TARGET.CAPABILITY += SwEvent
LIBS += -lcone -leikcore -lws32
}
prob
This does not work in Nokia Qt SDK
Then how to make it work in Nokia Qt SDK?
Vinayppatil1989 - Worked
Why the hell i didnt found this post early... Goggling from past 17 hrs...
Thanks a lot.. Worked for me..vinayppatil1989 22:25, 15 September 2011 (EEST)
Hamishwillee - You shouldn't need SwEvent capability
You only need SwEvent to set a priority of KPasswordWindowGroupPriority or greater. You may need Cone as indicated. Haven't tested.hamishwillee 07:08, 7 March 2012 (EET)