×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Bring background app to foreground - Qt

    Hi all,

    I am successful in sending the app to background on pressing the red key.

    But whenever I try to open the running app from the phone menu icon, the app ui does not show up. Instead a black screen is shown.

    Can somebody please let me know how to do that to make the ui come up seamlessly?

    Thanks

  2. #2
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: Bring background app to foreground - Qt

    I am using the following code to send the app to background.

    Code:
    //        RWindowGroup* wg = &CCoeEnv::Static()->RootWin();
    //        wg->SetOrdinalPosition(0);
    I am looking similar to bring it back to the foreground. I tried setting the ordinal position to 1 but didn't work.

    One doubt I have is how would app detect that somebody has opened it because at that point some code should work
    to make this happen.

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,568

    Re: Bring background app to foreground - Qt

    SetOrdinalPosition(0, ECoeWinPriorityAlwaysAtFront)? It worked in the past.
    In Avkon, there is a single call for it, CAknAppUi::BringToForeground. While you probably can not use it from Qt, if nothing else works, you may check what it does in the source code (project symbiandump on SourceForge, but I think you know it already).

  4. #4
    Registered User
    Join Date
    Jun 2012
    Posts
    39

    Re: Bring background app to foreground - Qt

    if your app is QWidget based call your main widget's lower() method to send it to background.
    If you re-open it from menu it will work fine again.

    E.g. QMainWindow main;
    [...]
    main.show();

    in your method which captures the key press

    main.lower()

Similar Threads

  1. S60 eswt midlet: Bring it to foreground and background!
    By thejakumarsk in forum Mobile Java General
    Replies: 0
    Last Post: 2009-08-10, 12:20
  2. Replies: 0
    Last Post: 2008-04-24, 12:33
  3. Replies: 1
    Last Post: 2006-04-27, 18:10
  4. How to bring exe from background to foreground?
    By toughworker in forum Symbian
    Replies: 2
    Last Post: 2004-12-20, 00:01
  5. how to bring inactive (or background) app into foreground?
    By nitinkumar in forum Symbian User Interface
    Replies: 1
    Last Post: 2003-03-10, 07:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •