Results 1 to 3 of 3

Thread: How to capture exit slot of main window

  1. #1
    Join Date
    Apr 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to capture exit slot of main window

    In main window, the X button that comes on top right side of the window, how to capture signal onClick corresponding to this button. Basicaaly I want to handle the slot corresponding to the exit button as some pre processing is to be done.

    Pls help

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to capture exit slot of main window

    Reimplement the close event handler (QWidget::closeEvent()).

  3. #3
    Join Date
    Apr 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to capture exit slot of main window

    Thanks a lot. That worked.

Similar Threads

  1. accessing my main application window widget
    By jayw710 in forum Newbie
    Replies: 8
    Last Post: 15th November 2007, 19:33
  2. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21
  3. Main window
    By Michiel in forum Qt Tools
    Replies: 1
    Last Post: 20th March 2006, 23:54

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.