What kind of possibilities there are to get faster QTableView performance when adding big amount of rows. I want to add say, 10 000 rows in "batch" and then display it to user. It seems too slow for me. I want to know what is the fastest way to add "batch" data of large amounts.

I'm using QTableView and setting QStandardItemModel as model.

Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication app(argc, argv);
  4.  
  5. QStandardItemModel model(50, 3);
  6. for (int i = 0; i < model.rowCount(); ++i) {
  7. for (int j = 0; j < model.columnCount(); ++j) {
  8. QStandardItem *item = new QStandardItem(QString("%1, %2").arg(i).arg(j));
  9. model.setItem(i, j, item);
  10. }
  11. }
  12.  
  13. view.setModel(&model);
  14. view.setVerticalScrollBar(new WideScrollBar(&view));
  15. view.show();
  16.  
  17. return app.exec();
To copy to clipboard, switch view to plain text mode