Hi,
I have problem with performance QListView.
For add items I used this function
void MainWindow
::addToModel(const QString &path
) {
item->setIcon( icon );
item->setText( path );
dirModel.appendRow( item ); // QStandardItemModel
}
void MainWindow::addToModel(const QString &path)
{
QStandardItem * item = new QStandardItem();
item->setIcon( icon );
item->setText( path );
dirModel.appendRow( item ); // QStandardItemModel
}
To copy to clipboard, switch view to plain text mode
It work fine but when I try add 200 000 items my application froze for 3-4 seconds.
What I already done is
setUniformItemSizes( true );
setUniformItemSizes( true );
To copy to clipboard, switch view to plain text mode
What can I do to speed up this process?
Bookmarks