repaint viewport of tableview
This commit is contained in:
parent
b9800ba655
commit
0b570ca9cb
@ -100,8 +100,8 @@ class MainWindow(QMainWindow):
|
|||||||
self.view = QTableView()
|
self.view = QTableView()
|
||||||
self.view.setModel(self.model)
|
self.view.setModel(self.model)
|
||||||
|
|
||||||
delegate = ColorDelegate(self)
|
self.delegate = ColorDelegate(self)
|
||||||
self.view.setItemDelegate(delegate)
|
self.view.setItemDelegate(self.delegate)
|
||||||
|
|
||||||
self.setProxyViewSettings()
|
self.setProxyViewSettings()
|
||||||
self.view.activated.connect(self.cell_clicked)
|
self.view.activated.connect(self.cell_clicked)
|
||||||
@ -231,6 +231,8 @@ class MainWindow(QMainWindow):
|
|||||||
#db.viewedEntry(hash1)
|
#db.viewedEntry(hash1)
|
||||||
self.view.selectionModel().currentIndex()
|
self.view.selectionModel().currentIndex()
|
||||||
self.model.setData({0,8},hash1,role=1001)
|
self.model.setData({0,8},hash1,role=1001)
|
||||||
|
self.view.updateGeometries()
|
||||||
|
self.view.viewport().repaint()
|
||||||
|
|
||||||
def queryFineFilers(self):
|
def queryFineFilers(self):
|
||||||
FineFilterItems = self.getFineFilters()
|
FineFilterItems = self.getFineFilters()
|
||||||
|
@ -58,6 +58,8 @@ class SqlQueryModel_editable(QSqlQueryModel):
|
|||||||
return result
|
return result
|
||||||
self.updatelist = []
|
self.updatelist = []
|
||||||
return result
|
return result
|
||||||
|
self.dataChanged.emit(index-100,index+100)
|
||||||
|
self.layoutChanged.emit()
|
||||||
return QSqlQueryModel.setData(self, index, value, role)
|
return QSqlQueryModel.setData(self, index, value, role)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user