[PyKDE] Question from a beginner
mail at r2s2.de
Wed Oct 29 13:44:01 GMT 2003
Am Mittwoch, 29. Oktober 2003 11:27 schrieb Angel Lopez Muñoz:
> I used to leave these files as it to be make modifications with the
> qtdesigner and do not destroy my changes in the code (is it correct??)
Yes, that's right you should never change automatically created code. The
best way to do this, is to subclass the created classes.
> My questions:
> is it correct like that???
Like I said, it's better to subclass the designer created classes.
Besides that, what exaclty do you think may be incorrect?
> In fact it works, but I don't know if it is correct to make the
> connections of the widget2 in the main program. I wish make different files
> for each widget, and do the imports in it and also do the connections in
> it. But if I do that I obtain an error: QPaintDevice: Must construct a
> QApplication before a QPaintDevice. this occurs because I do an
> w2=widget2()in a file in which I haven't defined a =
> QApplication(sys.argv)(I suppose )
If you create subclasses (which can pyuic create too) you just need to make
sure that those subclasses are created after the QApplication.
Concerning your other mail: What kind of examples are you looking for?
PS: On the mailinglist are many people not using Windows, so I suggest not
sending your mails in HTML.
More information about the PyQt