def editar(self,index=None): if index==None: index=self.ui.tvOfertas.selectedIndexes()[1] if isinstance(index,QModelIndex): key=str(index.sibling(index.row(),0).data().toString()) editor=EditorOferta(self.ui,key) if editor.exec_()>0: self.listar()
def agregar(self): self.iniciar() editor=EditorOferta(self.ui) if editor.exec_()>0: print " Promocion agregada " self.listar()