Results 1 to 2 of 2

Thread: Capturing close

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Capturing close

    Hi,

    I have a MDI app and want to capture when the user clicks the close button on the main window ( x button ), is there a signal for this I can capture in my main app?

    Thanks,
    Steve

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Capturing close

    No, there is no such signal. You have to reimplement closeEvent() for the window. If you want to avoid subclassing, you can of course apply an event filter. If you ignore() the event, the window will not be closed.

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

    lemos (15th October 2007), steg90 (25th September 2007), WinchellChung (18th March 2008)

Similar Threads

  1. F2 keyPressEvent Not Capturing
    By Rayven in forum Qt Programming
    Replies: 1
    Last Post: 2nd August 2007, 20:41
  2. Replies: 1
    Last Post: 7th July 2007, 09:03
  3. Replies: 3
    Last Post: 16th November 2006, 12:24
  4. Replies: 3
    Last Post: 23rd July 2006, 18:02
  5. Qmenu Stable close on QTableWidget
    By patrik08 in forum Qt Programming
    Replies: 1
    Last Post: 17th July 2006, 10:03

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.