Results 1 to 4 of 4

Thread: QProcess, how to give focus to the new process on Mac

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question QProcess, how to give focus to the new process on Mac

    My application on Mac starts another process using QProcess.
    The new application started using QProcess is hidden behind the original application.

    The problem is that I do not have the code for the application which I start using QProcess, so I need to give it access from my Qt based application.

    I will truly appreciate the help,

    Ashraf Sultan
    Simulation Lab Software
    www.simlab-soft.com

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QProcess, how to give focus to the new process on Mac

    By "giving access" you mean to activate its window and bring it to front? There is no simple way to do this. It would be probably easiest if you just minimized the window of your application but there is no guarantee there won't be other windows obscuring the one you want.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QProcess, how to give focus to the new process on Mac

    Thank you for the suggestion. I will try it.

    I was hoping that Mac has a C/C++ function which gives the focus to a process based on its process ID.
    QProcess already returns PID.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QProcess, how to give focus to the new process on Mac

    It probably has such a function somewhere. But that's certainly not a simple solution.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 18th May 2009, 09:49
  2. Connecting with QProcess to an already running process
    By high_flyer in forum Qt Programming
    Replies: 7
    Last Post: 26th November 2007, 10:31
  3. Replies: 4
    Last Post: 4th June 2007, 08:33
  4. Replies: 2
    Last Post: 30th March 2007, 08:10
  5. QProcess : child process listening parent output ?
    By Nyphel in forum Qt Programming
    Replies: 16
    Last Post: 20th March 2007, 13:40

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.