Results 1 to 4 of 4

Thread: Need to bring Qt application to foreground called from win32 application

  1. #1
    Join Date
    May 2009
    Posts
    83

    Default Need to bring Qt application to foreground called from win32 application

    Hello i have simple win32 application that uses the createProcess method to call Qt application the problem is i like to bring the Qt application to the foreground . who is responsible for this ? the parent win32 app or the Qt application ?

  2. #2
    Join Date
    Apr 2011
    Posts
    61
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need to bring Qt application to foreground called from win32 application

    Look at the CreateProcess (CreateProcess Function) this param: LPSTARTUPINFO lpStartupInfo. [IMG]STARTUPINFO[/IMG].

    There's a field to set how the window will show, WORD wShowWindow;

    You can use the same values that you can use in the ShowWindow Function.

    I think if you use this SW_SHOWNORMAL it will work.

  3. #3
    Join Date
    Jul 2010
    Location
    Ahmedabad,Gujarat,India
    Posts
    25
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Need to bring Qt application to foreground called from win32 application

    Try this it might be helps you.

    this->stackUnder(parentWidget()); [this means your QMainwindow]

  4. #4
    Join Date
    Mar 2010
    Posts
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Need to bring Qt application to foreground called from win32 application

    Not a answer but some hints:

    One application of mine is minimzed to the tray. To bring it to the front again I use this code:
    Qt Code:
    1. showMinimized(); // This is to bring up the window if not minimized
    2. // but beneath some other window
    3. setWindowState(Qt::WindowActive);
    4. showNormal();
    To copy to clipboard, switch view to plain text mode 

    I've got this code from sowhere but can't remember where. So tribut to the unknown guy who posted it in the wast land of the iternet...
    Using Qt 4.7
    Developping on Win 7 and XP
    Using Qt Creator, Eclipse and Visual Studio
    Target Platforms Win, Linux and soon OS X

  5. The following user says thank you to woodtluk for this useful post:

    pavanbarot (10th October 2011)

Similar Threads

  1. Bring application window to front
    By St@n in forum Qt Programming
    Replies: 13
    Last Post: 5th July 2019, 01:55
  2. Replies: 4
    Last Post: 11th January 2011, 07:56
  3. Receiving application foreground event
    By kokilakr in forum Qt Programming
    Replies: 0
    Last Post: 24th June 2010, 11:31
  4. Replies: 0
    Last Post: 10th April 2009, 15:28
  5. Qt3 Bring to front application
    By nleverin in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2008, 11:27

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.