How to sort items in Qt QListview using Qt.UserRole
问题 I'm having some problem sorting the items in my QListView using values in a field I specified. Basically what I'm trying to do is this: Detect faces in a collection of photos and display them in a QListView Cluster the faces (images) Update the view by placing items in the list (which are face images) belonging to the same cluster in together. Concretely, if item 1, 3, 5 are in one cluster and items 2, 4, 6 are in another, then items 1, 3, 5 should be displayed (in whatever permutations)