[PyKDE] Auto-Connection supported in PyQt4

Torsten Marek shlomme at gmx.net
Wed Jan 11 19:02:33 GMT 2006

Hash: SHA1

Andreas Pakulat schrieb:
> On 11.01.06 03:25:23, Andreas Pakulat wrote:
>>is the auto-connection feature of QObject supported with PyQt4? Will it
>>be supported in the future?
>>I just tried with a function that is called:
>>in a widget that uses a ui created with designer and inheriting from
>>that ui. So removePictureFormat is in fact a member of the class.
>>This doesn't work, i.e. the function is not called when clicking the
>>button, thus my question.
> I tried to dig a bit into this, it seems there are 2 things missing for
> auto-connection to work:
> 1. The wrapper for QMetaObject needs to expose connectSlotsByName, this
> is in qobjectdefs.sip (and qobjectdefs.h in the qt source).
> 2. pyuic needs to generate something like:
> QtCore.QMetaObject.connectSlotsByName(widget) in the setupUi(self,
> widget) function.
> However I'm not sure it's that simple, because I don't know how PyQt4
> wraps all the Meta-Object stuff. That means, maybe a pythonic
> implementation for connectSlotsByName needs to be provided.
> Phil can you comment on this, if it's possible to have auto-connection
> at all and if you want to do it? (I can provide a patch for pyuic4 to
> generate that one extra line of code).


I'm going to look into that once I'm back in Germany and have some free time on
my hand, possibly next week.



- --
Torsten Marek <shlomme at gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146  894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net

Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the PyQt mailing list