[PyQt] How do I subclass QTextEdit without warnings on close?
Hans-Peter Jansen
hpj at urpla.net
Tue May 3 09:34:11 BST 2011
Hi Brad,
sorry for being a little sparse on my reply, but I'm glad, you figured
it out with the help of Zoli.
As an aside, could you ask kmail to NOT add a Reply-To: header for
messages to this list, please? They're a real PITA. Netizens are
usually able to decide themself to whom they want to reply. For this
kind of conversation in such a low traffic ML, a single answer to the
list is the best fit IMHO (which is subverted by the Reply-To:
lists at ralph.id.au header).
On Tuesday 03 May 2011, 04:49:24 Brad Ralph wrote:
[...]
>
> I also would like to know why you suggest using Super()? I seem to
> remember that there were warnings in the PyQt docs that using it in
> certain cases could cause problems, so I've always avoided it. I
> also tend to think that it breaks the 'explicit is better than
> implicit rule' but that is just an opinion.
No, super is perfectly fine for new style classes, even if you don't
inherit from multiple classes (which doesn't work well, if more then
one inherits from QObject).
In fact, it lowers the risk of refactoring and copy/paste errors.
> Thanks in advance for your help.
You're welcome,
Pete
More information about the PyQt
mailing list