Results 1 to 3 of 3

Thread: showMinimized() steals the focus

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

    Default showMinimized() steals the focus

    Hi all,

    I have a bit nasty problem. I have main application that in some predefined situations shows a minimized window. The problem is that the new minimized window must not steal the focus from the main application window( or other applications ). setFocusPolicy( Qt::NoFocus ); doesn't have effect in this case. I will be glad to hear to some succestions.

    Regards,
    Nikolay

  2. #2
    Join Date
    Jan 2006
    Location
    Boston, MA
    Posts
    40
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: showMinimized() steals the focus

    You could always set focus to any window or widget manually by QWidget::setFocus().

    Regards

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

    Default Re: showMinimized() steals the focus

    Yep this solution is easy one when we are talking for the application itself, but this showMinimized() function also takes focus from other programs, and sinse I can't take QWidget pointer for example of the Firefox window how I will return the focus to it?

    Edit: Some info that I should give at the bigining:

    OS: Windows XP SP2
    Qt: 4.4.3
    Compiler: Visual C++ 2008

Similar Threads

  1. Focus rect not drawing
    By draftpunk in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2008, 15:21
  2. QTableView focus issue
    By gemidjy in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2008, 15:51
  3. Force focus to a QTabWidget page's widget
    By thomaspu in forum Qt Programming
    Replies: 1
    Last Post: 2nd January 2008, 06:54
  4. Tab/Enter focus problem
    By b1 in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2006, 23:34

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.