Hello, I need help with a Qtableview control in python

1

I'm working with Python and Pyqt5 I get the data from a table in mysql in the Qtableview with the model but I can not add the value of one of the columns I get in the table. I need to assign it to the label text property.

thanks

self.model= QSqlTableModel(self)
            self.model.setTable("tablaunion")
            self.model.setEditStrategy(QSqlTableModel.OnManualSubmit)
            self.model.select()
            self.ui.tableView.setModel(self.model)
            #self.model.setFilter("Centro_de_Costo like '"+self.ui.comboBox.currentText()+"%'")
            self.model.setFilter("Fecha_Carga between '"+ Fecha1 +"%' and '"+ Fecha2 +"%' and Centro_de_Costo like '"+self.ui.comboBox.currentText()+"%' order by Fecha_Carga")
    
asked by Julio 20.10.2017 в 15:36
source

0 answers