I have a QTreeWidget with multiple columns, I add QTreeWidgetItems to it. I am trying to have the second column contain a numeric value for each Item , so I can sort the items by this value
QTreeWidgetItem has a method called setData(int column, int role, QVariant(data))
I cannot find documentation for this role argument. All I know is that if I set it to 1 or 2, something will appear in the column, if I set it to 0 or> = 3, nothing is displayed in the column, regardless of whether the numbers always end sorted alphabetically, which is incorrect.
model-view-controller qt pyqt qabstractitemmodel
Nathan
source share