Many cell widget in QTableWidget
Hello,
I have a short question about QT tables (or more precise QTableWidget). I need to build a table with about 12 000 lines and every line has a checkbox (cell widget) in it. But these checkboxes make the tablewidget very slow about half a minute until the window is redrawn. Is there a possibility to get this faster or should the concept be revised?
I am using Windows XP. Under Linux this effect does not occur.
Regards,
Benarez
Re: Many cell widget in QTableWidget
Have you tried to use QTableWidgetItem (instead of cell widget) and use its checked state (QTableWidgetItem::setCheckState), is there any difference in the speed?
Re: Many cell widget in QTableWidget
If you want good performance, then implement your own custom model where you have to return proper flags for checkable items (ItemIsUserCheckable) and proper values in data() for Qt::CheckStateRole and set proper things in your underlaying model structure for Qt::CheckStateRole. Then set this model to QTableView
Re: Many cell widget in QTableWidget
Using QTableWidgetItem instead of cell widget already brought enough performance for me (for now). I will keep in mind implementing a new model for the table if I need even more performance.
Thanks for the help.
Regards,
Benarez