Results 1 to 3 of 3

Thread: modeless dialog closed signal?

  1. #1
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default modeless dialog closed signal?

    Is there a signal for when a modeless dialog closed?
    I'm trying to write a simple popup dialog that disappears when the user clicks back on the main window. Sort of like how the popup on this date picker behaves: http://www.basicdatepicker.com/

    I can't seem to find such a signal though - it's not finished() (seems to be for modal dialogs only?), not destroyed() (only when object gets deleted?)... ?
    Software Engineer



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

    Default Re: modeless dialog closed signal?

    If you set the destructive close attribute on the dialog, it'll emit a destroyed() signal...

  3. The following user says thank you to wysota for this useful post:

    gfunk (5th January 2007)

  4. #3
    Join Date
    Apr 2006
    Location
    San Francisco, CA
    Posts
    186
    Thanks
    55
    Thanked 12 Times in 11 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: modeless dialog closed signal?

    Hmm, that might work, but I'd rather not delete the object - need to extract data from it after the window is closed. I thought about using closeEvent() too, except that I didn't want to handle the close events triggered by clicks outside of the popup window.

    In the end, I just wound up connecting a signal from the popup to a custom slot (a handler for selectionChanged() as it were) that just manually closes the window and emit a closed() signal at the same time. Seems simple enough.
    Software Engineer



Similar Threads

  1. Replies: 3
    Last Post: 23rd July 2006, 18:02
  2. Replies: 2
    Last Post: 17th May 2006, 21:01
  3. modeless dialog
    By mhoover in forum Newbie
    Replies: 2
    Last Post: 23rd March 2006, 22:56
  4. Dialog positioning in GNOME
    By simk in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2006, 09:41
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

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.