Results 1 to 2 of 2

Thread: simple Question about QDialog::closeEvent(...)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    258
    Thanks
    22
    Thanked 19 Times in 16 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default simple Question about QDialog::closeEvent(...)

    Hi all, one would assume that closeEvent is called whenever the window/dialog is closed. I experimented around with a Dialog whose geometry I wanted to save. I had previously thought that the QDialog::accept() and QDialog::reject() slots indirectly invoke the closeEvent() since the dialog is closed after calling them per default. But closeEvent is only invoked when I hit the title bar close button. But shouldn't closeEvent be called no matter what leads to the closing of the dialog? After all it is _closed_ and one would expect closeEvent to be called!

    example: main.cpp

    Thanx in advance

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

    mentalmushroom (9th March 2018)

Similar Threads

  1. QTextEdit simple question
    By Marcopolo in forum Qt Tools
    Replies: 4
    Last Post: 11th October 2007, 00:01
  2. simple thread layout question
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 12th August 2006, 11:02
  3. simple hello world question
    By chap19150 in forum Qt Programming
    Replies: 12
    Last Post: 11th July 2006, 19:42
  4. simple question on Class-Members
    By mickey in forum General Programming
    Replies: 7
    Last Post: 4th February 2006, 22:37
  5. QTextEdit Qt4: simple question
    By TheKedge in forum Qt Programming
    Replies: 4
    Last Post: 18th January 2006, 12: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.