[PyKDE] Connections with QWidgetFactory

Juan Pablo Romero jpablo.romero at gmail.com
Wed Mar 23 06:36:19 GMT 2005


Hello

I have a designer file that defines my app main window ("principal.ui").

Then using QWidgetFactory the actual window is created:

----------------------
def main(args):
    app=QApplication(args)
    pyimpl = R() # R is derived from QObject
    mainWindow = QWidgetFactory.create("principal.ui", pyimpl)
    pyimpl.setParent(mainWindow)
    mainWindow.show()
    app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
    app.exec_loop()
----------------------

In C++, if you pass a second parameter to QWidgetFactory.create,  qt
automatically creates the conections defined in the ui file, using the
slots of the 2nd parameter.

But in PyQt, no connection is made. ¿Is this correct?

Thanks in advance

   Juan Pablo




More information about the PyQt mailing list