[PyQt] derive from a designer widget
apaku at gmx.de
Wed Mar 11 19:44:11 GMT 2009
On 11.03.09 16:55:11, Mario Daniel Carugno wrote:
> Hi, i'm using pytq4 + designer4.
> I want to design a generic main window with common buttons (next,
> previous, new, edit, ...)
> with a central area for data. That central area could be a frame.
> In QT3 remember i could derive my widget from another one made with
> designer, but that is
> not possible in QT4. That the behaviour i want.
You can still do the same thing, except that you'll additionally need a
python class subclassing QMainWindow that loads the ui from the designer
form. Then you can create subclasses from that and set the central
widget. If the form is a member of your base class you can also access
it and all widgets from the subclass.
You have an unusual magnetic personality. Don't walk too close to
metal objects which are not fastened down.
More information about the PyQt