[PyQt] When to and not to pass parent argument to widget constructors
R Johnson (Gmail)
ps16thypresenceisfullnessofjoy at gmail.com
Tue Apr 22 23:17:50 BST 2014
Thank you for your helpful reply.
> That's about how I do it as well. If you don't pass a parent, the
> object won't get deleted automatically, and you have to care about
> this yourself. If you do pass one, if you delete the parent, its
> children will be deleted automatically.
I hadn't known about that, but it makes sense. This wouldn't matter for
objects that exist for the entire life of an application, would it?
-- Timothy
P.S. I'm now sending from a different email address that allows e-mails
to be sent as plain text.
More information about the PyQt
mailing list