[PyKDE] Newbie: Initiate

Andreas Pakulat apaku at gmx.de
Sun Feb 12 12:51:51 GMT 2006


On 12.02.06 10:00:01, Mikhail Yarmish wrote:
>    Oh, now I see. I had the same problem and I used a little bit dirty 
> solution. I called that function from languageChange(self) function which was 
> created automaticly.
>    Just put there something like self.listChapters(). If you find some more 
> "clean" solution tell me it plz too =)

Yes, instead of doing all the stuff in the ui.h file, use a subclassing
approach. You design the gui in the designer, even create your slots but
leave them empty. Then create a new class without designer in a .py file
which subclasses your form-class and implement the slots there. In this
class you'll have an __init__ method where you can call these methods
that fill the widgets like listChapters() (you'll also need to call the
form-class' __init__ there).

Check the Qt documentation on Qt-Designer and the examples and
tutorials for more information. 

Andreas

-- 
Good day for a change of scene.  Repaper the bedroom wall.




More information about the PyQt mailing list