Results 1 to 2 of 2

Thread: setFocus to the same but already running application !?

  1. #1
    Join Date
    Jul 2010
    Location
    /home/hakermania/
    Posts
    233
    Thanks
    129
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Unhappy setFocus to the same but already running application !?

    The application on the constructor checks if the program is already running and then it outputs a QMessageBox and the the program exits. I would prefer to make it focus on the already running application of the same program!
    How can I do this? I 've search a lot about setFocus but I wasn't able to find something!
    When you 're trying to help somebody in the newbie section, don't forget that he is a newbie. Be specific and give examples.

  2. #2
    Join Date
    Sep 2010
    Posts
    145
    Thanks
    1
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: setFocus to the same but already running application !?

    You'll have to get your hands dirty with some platform-specific code. Since you already know the title(s) of your window(s), enumerating them and setting focus should be fairly straightforward.

    Look here and here for something to get you started on Windows.

Similar Threads

  1. running qt application on MAC
    By aj2903 in forum Qt Programming
    Replies: 1
    Last Post: 8th March 2010, 01:23
  2. running first application on s60
    By addu in forum Qt for Embedded and Mobile
    Replies: 14
    Last Post: 20th August 2009, 11:30
  3. How to invoke a running application
    By srikanthch in forum Qt Programming
    Replies: 2
    Last Post: 18th December 2008, 15:42
  4. Running the application
    By Afflicted.d2 in forum Installation and Deployment
    Replies: 9
    Last Post: 21st October 2006, 22:04
  5. Running application on Mac OS X
    By munna in forum General Discussion
    Replies: 1
    Last Post: 19th April 2006, 20:10

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
  •  
Qt is a trademark of The Qt Company.