Results 1 to 3 of 3

Thread: Raise program from tray when clipboard intercept.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Question Raise program from tray when clipboard intercept.

    I start my program in background and it intercept clipboard, and when it do it main window should apear. So, I use hide() and show(). But my program only apears on task bar (with orange colour under XP). And I can't find way to show window. My program window is show favlesly when I use right mouse menu on tray icon (with the same function show()). In perfect scenario main window of my program should apear with out focus (which should remain in previous application). I have many programs which shows various smal windows when some events ocurs (so I think it is feasible).
    So: How to raise program from tray with out direct user action?

  2. #2
    Join Date
    Aug 2007
    Posts
    166
    Thanks
    16
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Raise program from tray when clipboard intercept.

    Basically you can't. Windows have a protection for such random focus taking. The best thing you can do is to use some custom window flags like Qt::ToolTip and some styles to show the window like a active tooltip(similar like chat messengers display custom tooltips above the task bar). You can keep it visible as long as you wish. Anyway you still will not have the focus but in this way you will make it easier for the user to click on that window.

  3. The following user says thank you to The Storm for this useful post:

    jmj (15th August 2010)

  4. #3
    Join Date
    Jul 2009
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Raise program from tray when clipboard intercept.

    Quote Originally Posted by The Storm View Post
    Basically you can't. Windows have a protection for such random focus taking. The best thing you can do is to use some custom window flags like Qt::ToolTip and some styles to show the window like a active tooltip(similar like chat messengers display custom tooltips above the task bar). You can keep it visible as long as you wish. Anyway you still will not have the focus but in this way you will make it easier for the user to click on that window.
    At least some messengers can open new windows (=chats) when you receive a message. Also, jdownloader opens dialogs with full input focus when the program is minimized. So there must be at least a way to open a new window (be it mainwindow- or dialog-derived) when the program itself is not visible.

    i'm wondering what one had to do achieve this?

Similar Threads

  1. Intercept minimize window event
    By vereteran in forum Newbie
    Replies: 8
    Last Post: 17th October 2009, 06:33
  2. widget raise!
    By zgulser in forum Qt Programming
    Replies: 3
    Last Post: 27th May 2009, 07:10
  3. Why should a removeSubWindow() raise exception?
    By Raccoon29 in forum Qt Programming
    Replies: 7
    Last Post: 21st March 2008, 11:17
  4. Intercept ShowDesktop event
    By Lele in forum Qt Programming
    Replies: 4
    Last Post: 20th December 2007, 20:05
  5. Intercept Ctrl-c from the command line
    By irudkin in forum Qt Programming
    Replies: 1
    Last Post: 21st August 2007, 21:05

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.