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
}

