[Qt-interest] Dialogs and [X] close button

Miguel Cardenas mfcardenas at gmail.com
Sat Feb 14 17:13:35 CET 2009


Hello list

I have a doubt... when creating dialogs on the fly, for example when you
have a menu Help->About and a QDialog window is created, it shows something
and then you can have a [Close] button or perhaps somebody clicks on the [X]
close window button...

Does the [X] button destroy (delete) the object or just hides it?

I have connected a menu action signal to a slot function that creates a
QDialog and shows it, but how should I close it? do I have to hide the
window or kill it?

I want to kill it so it does not use memory after using it and to avoid that
several calls to Help->About or other menu items that require to create a
dialog build lots of repeated objects if the created dialog is only hidden
after [Close] or [X] button is clicked...

Can an object destroy itself, for example when the user clicks a [Close] or
maybe a [Done] button?

Thanks

-- 
Miguel Cardenas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090214/a0909a5b/attachment.html 


More information about the Qt-interest-old mailing list