[PyKDE] Qt4 and uic - dynamic generation
Jeremy Sanders
jeremy at jeremysanders.net
Fri Jul 22 11:31:05 BST 2005
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!
Jeremy
--
Jeremy Sanders <jeremy at jeremysanders.net>
http://www.jeremysanders.net/ Cambridge, UK
Public Key Server PGP Key ID: E1AAE053
More information about the PyQt
mailing list