Results 1 to 4 of 4

Thread: connect window's close button

  1. #1
    Join Date
    Mar 2011
    Posts
    23
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default connect window's close button

    how can i connect window's close button with my function.

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: connect window's close button

    You can over-ride the QWidget::closeEvent

    Also you can tell us more about what are you trying to achieve, what function are you trying to call, what window close is supposed to trigger the function call (the main-window or some child-window) and maybe some other solutions will pop-up.

  3. #3
    Join Date
    Mar 2011
    Posts
    23
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: connect window's close button

    i solve my problem using closeEvent
    thank you

  4. #4
    Join Date
    Jul 2011
    Posts
    1
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: connect window's close button

    Quote Originally Posted by Zlatomir View Post
    You can over-ride the QWidget::closeEvent
    I even have tried this myself, and it is really proven effective...

Similar Threads

  1. Replies: 2
    Last Post: 6th May 2011, 08:02
  2. [PyQt4] Want to connect a window's close button
    By Dodle in forum Qt Programming
    Replies: 7
    Last Post: 21st April 2010, 11:13
  3. Replies: 1
    Last Post: 19th April 2010, 07:19
  4. how to disable X button to close th window
    By raghvendramisra in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2009, 20:01
  5. How to "hide window when close button pressed"
    By iGoo in forum Qt Programming
    Replies: 4
    Last Post: 26th July 2006, 09:53

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.