Potch
4th April 2009, 22:58
Hello,
So far I use the following way to color the colum of a tableview :
// Color the colum
for (int i = FirstLine; i < Max_Number_of_Lines; i++)
InputDataModel->setData(InputDataModel->index(i, SelectedColumn), SelectedVariableColor, Qt::BackgroundRole);
It works but it is very slow when Max_Number_of_Lines is greater than 2000. Then I have to wait 2 or 3s before it's colored.
Would you know if there is a faster (and more clever) way to proceed ?
Thanks in advance
So far I use the following way to color the colum of a tableview :
// Color the colum
for (int i = FirstLine; i < Max_Number_of_Lines; i++)
InputDataModel->setData(InputDataModel->index(i, SelectedColumn), SelectedVariableColor, Qt::BackgroundRole);
It works but it is very slow when Max_Number_of_Lines is greater than 2000. Then I have to wait 2 or 3s before it's colored.
Would you know if there is a faster (and more clever) way to proceed ?
Thanks in advance