[PyKDE] pyuic

Hans-Peter Jansen hpj at urpla.net
Thu Feb 24 10:49:24 GMT 2005

On Thursday 24 February 2005 11:20, Darren Robert Haagman wrote:
> I've been messing around with Python/QT/KDevelop which of course,
> converts a .ui to a .py file.
> Is there any work being done to _not_ erase the code in the .py
> file when redesigning the form?
> I find it rather frustrating when I make a small change in the .ui
> and then have to rewrite all of my python code for that module.

Did you read the comment on top of every pyuic generated scripts?

> OR
> Is there a way to inherit from the generated .py file in such a way
> that I can put my code in another derived class and still use the
> component events in that derived class?

Sure, it's called subclassing and is THE building block of any serious 
Qt app!

See, how form1.ui and runform1.py or sqlex.ui, sqlex.ui.h and 
runsqlex.py in examples3/SQL relates.. 


More information about the PyQt mailing list