I cannot figure it out, how to remove an item or an row from QFileSystemModel?
After using removeRows nothing happens. I've also tried
self.model.beginRemoveRows(QtCore.QAbstractItemModel.index(), 0, 10)
QFileSystemModel doesnt follow the conventional functions for removing items, I guess because it is so potentially destructive.
you need to call
self.model.remove(index) for each one. This will permanently delete the files.
You also need to call
self.model.rmdir(index) if it happens to be a folder.
If you are doing something more specialised, then you can use
QSortFilterProxy. Either use it directly with a QRegExp, or subclass and implement