Hi,
I searched arround google and this mailing too and I did not find info about
doing this specific question.

I have Main.py that calls Ui_ventanaPrincipal, where through a pushbutton I
want to connect another custom widget called Ui_crearAlumno, the signal of
ventanaPrincipal that connects Ui_crearAlumno is the next:
QtCore.QObject.connect(self.pushButtoncrearAlumno,
QtCore.SIGNAL("clicked()"), ventanaPrincipal.linkeacreaAlumno)

Main.py:
class ventanaPrincipal(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self)
        self.ventana = Ui_ventanaPrincipal()
        self.ventana.setupUi(self)

    def linkeacreaAlumno(self):
        class crearAlumno(QtGui.QWidget):
            def __init__(self):
                QtGui.QWidget.__init__(self)
                self.ventana2 = Ui_crearAlumno()
                self.ventana2.setupUi(self)
            def guardarDatos(self):
                return
        #app = QtGui.QApplication(sys.argv)
        ventana2 = crearAlumno()
        ventana2.show()
        sys.exit(app.exec_())


    def linkeaadministraAlumnos(self):
       return
    def linkeaEstadisticas(self):
        return
    def linkeaRecibos(self):
        return

def main():
    app = QtGui.QApplication(sys.argv)
    ventana = ventanaPrincipal()
    ventana.show()
    sys.exit(app.exec_())

if __name__ == "__main__":
    main()

I have tried almost everything and it functions with errors. What do I have
to do to fix the problem at def linkeacreaAlumno(self)?

Thank you.

Attachment: Main.py
Description: Binary data

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to