Solved Slow Scroll on QTableView after inserting 800 Rows and 27 Column.
-
i Have added one time 800 rows and 27 columns. But scrolling through table is slow. please help.
-
This smells a lot like a problem in either the model or the delegate. What are you using?
-
@VRonin I am not using any delegate. only Displaying data using custom model. but i have already added data to model.
-
Can you post the code for your custom model?
Also, can you try with:
QAbstractItemModel* model = new QStandardItemModel(this); model->insertColumns(0,27); model->insertRows(0,800); for(int i=0;i<800;++i){ for(int j=0;j<27;++j) model->setData(model->index(i,j),QString::number(i) + ','+ QString::number(j)); }
and see if that's fast enough for you?
-
@VRonin Now it is solved . problem is in data(const QModelIndex &index, int role = Qt::DisplayRole) function. Thanks for helping.