radio Button Sorting in QTableWidget
Unsolved
General and Desktop
-
My table has first column as text and next three column as radioButton how can I sort the next RadioButton if they are clicked and corresponding directory. Please find the attached pic of my ui![alt text]
-
@MarshMallow said in radio Button Sorting in QTableWidget:
My table has first column as text and next three column as radioButton how can I sort the next RadioButton if they are clicked and corresponding directory.
- subclass a QSortFilterProxyModel and wrap it around your existing model and assign this model to your view
- reimplement it's lessThan() method
- implement the logic for your columns, call the base class implementation for irrelevant columns
- call sort() on the proxy model
Also see this