QFileSystemModel hide certain files

2.9k views Asked by At

What I'm looking for is pretty much the opposite of QFileSystemModel::setNameFilters(). I'd like to set filters that catch things I don't want to show, but let everything else through. I don't see any way to go through and hide certain files, because remove() actually removes the file from the system.

How do I go about this?

Edit for clarification: I have a specific list of filenames that I don't want to show.

1

There are 1 answers

3
Martin Beckett On

Not a perfect solution but are there any existing presets in QDir::Filters that you can use? It will filter things like dirs, symlinks, system files etc