radio Button Sorting in QTableWidget
Unsolved
General and Desktop
-
wrote on 30 May 2018, 11:31 last edited by
-
wrote on 30 May 2018, 11:36 last edited by
How do you implement those radio buttons?
(please don't say
setItemWidget
, it just hurts more every time I see it) -
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
1/3