[PyKDE] Using UI files in your app with PyQt4
shlomme at gmx.net
Wed Jan 25 06:38:19 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Andreas Pakulat schrieb:
>>>>However, it gets called with a QString, which is the other signal variant of
>>>>QSpinBox. What do I have to do to make it work?
>>>Seems like a bug in pyuic4, but I don't have time to look into it ATM,
>>>so we have to wait until Torsten comments.
>>please see Phil's mail about that. However, there are several workarounds possible:
>>- - name the arguments after the expected C++ types (possibly with a prefix)
> surely with a prefix, as int is not a correct type name, is it?
>>- - decorate the function with the signal definition
> What do you mean with that?
I was a bit short yesterday, but it was already late. I meant
and the decorator saves the signature as an attribute of the function, for use
>>- - extend the naming convention of autoconnect slots (which breaks compatibility
> I don't think that we should do that, it will confuse people.
> Now, I don't know much about python docstrings, but could we do it with
> those (was that what you meant with your 2nd suggestion)? Like a special
> line in the docstring that hold the type of the parameters in the order
> they appear in the function signature?
Yes, that would be possible to, but the decorator approach is more explicit
Beautiful is better than ugly.
Explicit is better than implicit.
> PS: Torsten I found at 2 bugs in current pyuic concerning custom wigets,
> but I send out a separate mail on those
Ok, looking forward to them:)
Torsten Marek <shlomme at gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the PyQt