Results 1 to 6 of 6

Thread: Problem hiding main window on minimize

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2006
    Posts
    90
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    6
    Thanked 4 Times in 2 Posts

    Default Re: Problem hiding main window on minimize

    I contacted Trolltech and they gave me this gem:

    Qt Code:
    1. void CINQtMainWindow::changeEvent(QEvent * e )
    2. {
    3. if (e->type() == QEvent::WindowStateChange)
    4. {
    5. if (isMinimized() == true)
    6. {
    7. QTimer::singleShot(0, this, SLOT(hide()));
    8. m_oSysTray.ShowIcon();
    9. e->ignore();
    10.  
    11. return;
    12. }
    13. }
    14.  
    15. QMainWindow::changeEvent( e );
    16. }
    To copy to clipboard, switch view to plain text mode 

    QTimer::singleShot(0, this, SLOT(hide())); instead of hide()

  2. The following 3 users say thank you to bpetty for this useful post:

    araglin (8th May 2009), Memnoch (28th January 2009), tpf80 (17th January 2009)

Similar Threads

  1. Background image for main window widget using css.
    By Enygma in forum Qt Programming
    Replies: 8
    Last Post: 23rd August 2007, 16:40
  2. New to QT, problem displaying main window...
    By McCall in forum Qt Programming
    Replies: 4
    Last Post: 15th June 2007, 15:27
  3. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 09:41
  4. Problem in porting Main window on linux
    By jyoti kumar in forum Qt Tools
    Replies: 2
    Last Post: 2nd June 2006, 09:35
  5. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 11:21

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.