[PyQt] How to explicitly delete a QDialog when finished with it?

Florian Bruhin me at the-compiler.org
Thu Jul 12 11:47:11 BST 2018


Hey,

On Thu, Jul 12, 2018 at 11:07:41AM +0100, J Barchan wrote:
> Either way, if I do *not* specify WA_DeleteOnClose I want to delete it
> explicitly when I'm done reading its values or whatever.  In C++ I'd call
> delete explicitly.  What should I do from PyQt/Python?  del??
> .deleteLater()??

I just use obj.deleteLater(). There's also sip.delete(obj) if you really
need something gone immediately, but I almost never use that.

Florian

-- 
https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
         I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180712/1c137d32/attachment.sig>


More information about the PyQt mailing list