Slow Scroll on QTableView after inserting 800 Rows and 27 Column.
Solved
General and Desktop
-
wrote on 23 Jan 2018, 11:05 last edited by
i Have added one time 800 rows and 27 columns. But scrolling through table is slow. please help.
-
wrote on 23 Jan 2018, 11:08 last edited by
This smells a lot like a problem in either the model or the delegate. What are you using?
-
wrote on 23 Jan 2018, 13:44 last edited by VRonin
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?
-
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?
5/5