I have a Sqlite model of several 1000 rows attached to a QTableView. I can view rows in a QTableView, but when I scroll to the bottom of a QTableView, I can only get to the end of the first few rows. If I continue to press the scroll button, new lines are added to the view, but I cannot easily scroll to the end. After all the lines are added to the view, I can easily scroll from top to bottom without any problems.
Here's the important part of the code (which is standard):
self.db = QtSql.QSqlDatabase.addDatabase("QSQLITE")
self.db.setDatabaseName(dbFileName)
self.model = QtSql.QSqlTableModel(self.db)
self.model.setTable("results")
self.model.select()
self.tableViewResults.setModel(self.model)
I need to skip something very simple. Any suggestions?
Laurence.
source
share