PDA

View Full Version : beginRemoveRows and endRemoveRows very slow with large data sets.



sheik482
23rd September 2010, 03:31
I have a table model created from QAbstractTableModel and it works fine with small amounts of data less then 1000. I have certain cases where I can have over 32,000 rows in a table. When I make a call to beginRemoveRows and endRemoveRows it takes over 10 milliseconds for the call to complete. Why is it taking so long? Is there any way I can speed this up?

tbscope
23rd September 2010, 06:45
Tip 1:
Use setUpdatesEnabled on the widget showing the model. Set it to false before changing the model and to true after changing.

Tip 2:
Set uniform row heights to true (if possible for your situation)

Question:
What are you using to view the table? A QTableView?