I need to show a QTreeView of a specific directory, and I want to give the user the ability to filter files using RegExp.
As far as I understand the Qt documentation, I can achieve this with the classes mentioned in the title, like this:
When the program starts, TreeView is correctly attached to the specified directory. But as soon as the user changes RegExp, it seems that TreeView has forgotten its RootIndex. After deleting all the text in RegExp LineEdit (or entering RegExp type ".") It displays all the directories again (on Windows, this means all drives, etc.)
What am I doing wrong?:/
source share