[PyQt] Is the result of SIGNAL() a constant?
henrik.pauli at gmail.com
Wed Jan 9 09:51:24 GMT 2008
On Wednesday 09 January 2008, Aaron Digulla wrote:
> > type(SIGNAL('')) would show that it is just a string.
> That confuses me a bit because when I try to pass a string as the
> second argument to connect, I get "argument 2 has a wrong type" :)
> But anyway: How much work would it be to have SIP generate constants
> for all SIGNAL's in a class? So I could say:
> self.connect(w1, w1.SOME_SIGNAL, ...)
> Pro: Doesn't break old code, API, etc. No more typos (or python will
> warn about a missing attribute) and PyDev could offer auto-completion
> for signals, too!
Contra: doesn’t look like Qt at all, and it’d be rather hard to know just what
to call different signals — especially ones sharing a name but differing in
More information about the PyQt