Large set of data in QTableView
-
@FroZtiZ
OK. Sorry if I am supposed to understand this from the foregoing, but I don't understand where your "~5 seconds to update/construct/destroy the table" is coming from? You have implemented afetchMore()
which only fetches 100 at a time, so that should be good. Is it being called repeatedly to read all 20/100k? Is there any overhead in physically getting the items? I don't understand where your 5 seconds is being spent? You need to discover that. -
@FroZtiZ said in Large set of data in QTableView:
The construction and destruction of QStandardItem in a QTableWidget is very slow. That is the reason why I decided to construct a QAbstractTableModel.
My code was slow to execute when I was using a QTableWidget with QStandardItem.
@FroZtiZ said in Large set of data in QTableView:
The current model that is described in my code above is very fast so, it seems to be the solution. Inside, I want to put 5 QList, each being a column of this model.
@FroZtiZ said in Large set of data in QTableView:
Thank you for your contributions. I found how to proceed by storing my data in a QList<QList<float>>.
Please find below a working code that can probably be improved:With the model I provided above, including "fetch", the problem is solved and the execution is fast.
-
@FroZtiZ said in Large set of data in QTableView:
the problem is solved and the execution is fast.
Then please mark this topic as solved, thx.