QTableWidget, selection problem
Hello,
I have a QTableWidget which I can edit. After I add a new row in any location of the table, I would like this row be visible immediately and also be selected.
Now my selection mode is row selection, and singleSelection.
I tried to use clearSelection() to clear the previous selection and go to the right position. But it looks like, only the previous selection cell is cleared, the rest of the previous row is still in gray. And so on...
Anyone has an idea how to implement this? Thanks in advance.
Re: QTableWidget, selection problem
I think the problem is caused by repaint(). But since I do the edition in another thread, I can not call repaint() in the edit function. update() is not working...
Re: QTableWidget, selection problem
OK, the problem was solved.
After changing the table, selection mode and behavior have to be set again. Then it works.