[PyKDE] Qt4 and uic - dynamic generation
Torsten Marek
shlomme at gmx.net
Fri Jul 22 11:48:48 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jeremy Sanders schrieb:
> On Thu, 21 Jul 2005, Sebastian Kügler wrote:
>
>> Not sure if I'd like to do this ...
>>
>> * I actually like the way it is done right now, you can easily
>> subclass the
>> generated python code, and I'm not sure how this should be done when
>> using .ui files directly. Furthermore, it might add overhead to do
>> this at
>
>
> I wasn't suggesting this would replace the existing subclassing.
>
> What I'm suggesting is that you could have some function which returns a
> class which you could then subclass, e.g.
>
> MyDialogBase = qt.LoadUI('foo.ui')
>
> class MyDialog(MyDialogBase):
>
> def foobar(self):
> ...
>
> Personally I think this is a lot nicer than having generated python code
> in my source tree. It means that someone could run a python script and
> it would just work, without having uic and so on installed.
>
> If this is what QWidgetFactory does, then that's great!
>
Hi,
you have to be careful with QWidgetFactory, because it creates an instance, not
a class. One Problem is, that you cannot override event handlers in it, but only
use signals and slots.
greetings
Torsten
- --
Torsten Marek <shlomme at gmx.net>
ID: A244C858 -- FP: 1902 0002 5DFC 856B F146 894C 7CC5 451E A244 C858
Keyserver: subkeys.pgp.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC4M8QfMVFHqJEyFgRArhcAKCrq6S+6z5RSumiyMXwFkPmPWrbbgCgnaYe
ab8bNk4WP/owqpBZy1bo+GY=
=Ug1W
-----END PGP SIGNATURE-----
More information about the PyQt
mailing list