PDA

View Full Version : Is that normal about QListView ?



Alundra
23rd January 2015, 18:01
Hi,
I have a QListView using icon mode and QFileSystemModel.
That sort correctly by name of files but when I edit one item that doesn't update the sort, the item is at the same place.
I have tried to add a key that call model()->sort( 0 ); but that doesn't sort anything.
How make that sort the item at the end of the edit ?
Thanks for the help

ChrisW67
24th January 2015, 09:13
You connect a slot to the fileRenamed() signal the model issues and have the slot call sort(). (You might even be able to use the generic dataChanged() signal)



I have tried to add a key that call model()->sort( 0 ); but that doesn't sort anything.

Really? Post a self-contained, compilable example program that demonstrates this.