Qt 6.11 is out! See what's new in the release
blog
How to check if the QTableWidget has similar rows
General and Desktop
7
Posts
4
Posters
3.8k
Views
1
Watching
-
That would depend on your definition of "similar". If you mean "identical", then you would first sort the data in the widget, and then iterate over the rows, first comparing the cell in the column on which you sorted, and then (if they match) the other cells untill they either do not match, or you reach the end of your columns (and you found a pair of matching rows).
-
Uhm...sounds like you have to define/extends a model with the logic for similar matching in it.
-
Of course performing a check of each row/cell against each other will affect performance. Maybe you can restrict the data to check against a unique set of columns. Hard to say without knowing which kind of data you are manipulating.