[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] Re: pyuic
From:       Jorge Luiz Godoy Filho <godoy () ieee ! org>
Date:       2005-02-24 10:44:37
Message-ID: 1706184.EvH1NXlgAa () jupiter ! g2ctech
[Download RAW message or body]

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.
> 
> 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?

Am I understanding it correctly and you're editing the files with the note:

# WARNING! All changes made in this file will be lost!

?

You should really subclass it and then work on the subclass.  It is just a
matter of where you send events to and which slots you have implemented.

You can also create Python code directly with Designer -- I've read that and
I didn't use this, yet... -- and end up with the specific code for the
interface on the same file.

But you shouldn't change the file by hand as the warning says.


In fact, I *like* that pyuic erases the file.  It forces you to separate
code from the UI from the rest of the code.  It also makes it easy to reuse
code with other kinds of interface without loosing the ability to work with
PyQt.

-- 
Godoy.    <godoy@ieee.org>

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic