Results 1 to 3 of 3

Thread: Avoid MainWindow from closing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2010
    Location
    Russia
    Posts
    83
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1
    Thanked 12 Times in 11 Posts

    Default Re: Avoid MainWindow from closing

    Qt Code:
    1. QToolButton button ;
    2.  
    3. button.setFocusPolicy( Qt::ClickFocus ) ; // explicitly set widget's focus policy : " the widget accepts focus by clicking. ". Look at the QWidget::setFocusPolicy function description
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to AlexSudnik for this useful post:

    KillGabio (14th February 2012)

  3. #2
    Join Date
    Jan 2012
    Location
    Argentina
    Posts
    167
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    33
    Thanked 10 Times in 10 Posts

    Default Re: Avoid MainWindow from closing

    Thanks Alex

Similar Threads

  1. Replies: 0
    Last Post: 6th November 2011, 10:22
  2. Replies: 2
    Last Post: 28th June 2011, 15:09
  3. Replies: 1
    Last Post: 12th April 2011, 10:53
  4. how to avoid crash of my application......
    By newb in forum Qt Programming
    Replies: 1
    Last Post: 30th August 2010, 11:09
  5. Closing all of the mainWindow's child dialogs
    By JPNaude in forum Qt Programming
    Replies: 4
    Last Post: 2nd October 2008, 14:18

Tags for this Thread

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.