I'd recommend to apply all kinds of sorting using a model.
Can you be more specific with the relations between the QListView, your custom widget and data you want to fill them with? Maybe some code with definitions?