class MainSimpson(QtGui.QMainWindow):
        #Init
        def __init__(self):
            QtGui.QMainWindow.__init__(self)
            self.ui = Ui_WSimpson()
            self.ui.setupUi(self)
            self.ui.pbResolver.clicked.connect(self.resolver)
            
        def resolver(self):
            lista=[]
            try:
                resp = simpson(str(self.ui.leFX.text()), float(str(self.ui.leA.text())), float(str(self.ui.leB.text())), float(str(self.ui.leN.text())), lista)
                
                for n in lista:
                    self.ui.teResultado.append(n)
                self.ui.lbResultado.setText(str(resp))
                
            except:
                self.ui.teResultado.clear()
                self.ui.teResultado.setText("Ingrese los datos corectamente")
 def __init__(self):
     QtGui.QMainWindow.__init__(self)
     self.ui = Ui_WSimpson()
     self.ui.setupUi(self)
     self.ui.pbResolver.clicked.connect(self.resolver)