Row Selection in QTableWidget
-
Hi all, In my project, I am populating a TableWidget with Names sorted in alphabetical order. The selected (checked) names will be printed out and further used.
At present, it starts scanning from top to check and get all the selected rows.
I want a behaviour where the scanning happens in the order, user selected. Eg:
Qtablewidget rows.
A
B
C
DIf user selected First C, then D and then A, output should be C D A...
At present it is giving A C D order.Is there a way to capture the selected rows continuosly ??
Also i had another thought where as soon as user selects a row that row can be moved to top (swap or shifting the already existing row) but cannot find a way to implement it !!! Is it possible? -
Hi all, In my project, I am populating a TableWidget with Names sorted in alphabetical order. The selected (checked) names will be printed out and further used.
At present, it starts scanning from top to check and get all the selected rows.
I want a behaviour where the scanning happens in the order, user selected. Eg:
Qtablewidget rows.
A
B
C
DIf user selected First C, then D and then A, output should be C D A...
At present it is giving A C D order.Is there a way to capture the selected rows continuosly ??
Also i had another thought where as soon as user selects a row that row can be moved to top (swap or shifting the already existing row) but cannot find a way to implement it !!! Is it possible?@Richie123 said in Row Selection in QTableWidget:
Is there a way to capture the selected rows continuosly ??
Yes, for example https://doc.qt.io/qt-5/qtablewidget.html#cellClicked