[PySide] When Slots and When Subclass?
me at the-compiler.org
Fri Mar 18 22:54:39 CET 2016
* Tim Roberts <timr at probo.com> [2016-03-18 14:47:20 -0700]:
> Is there some document that can help me understand what's likely to be
> signalled and what requires subclassing? Some general rule you use in
In general, things you'd control via subclassing are much more
low-level (like Qt's whole event system), and signals are much more
For example, with a QLineEdit, you could override keyPressEvent to get
low-level keypresses - or use the returnPressed signal, which works
with enter/return, and only emits when the input is valid if a
validator is set.
But there are certainly some exceptions (usually things which require
subclassing which IMHO would be much nicer as a signal).
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: Digital signature
More information about the PySide