Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
GrahamL last edited by
I am trying to get QCompleter to behave as follows -
complete folder names but only show files with a given extension
So for example
C:\ - user sees all folders under C
C:\my - user sees all folders that match
C:\myFolder\a - user sees all folders that match + any files that match a*.myext
I have played with the various options in QDirModel and QFileSystemModel but cannot find the correct combination.
Is this possible with QCompleter as it is or do I need to derive from it to get some extra functionality?
ScottR last edited by
Because of the strange requirement that "C:\my" only lists matching folders and "C:\myFolder\a" matches both files and folders, I suspect you will have to derive a class from QFileSystemModel and implement your own match().
Why shouldn't "C:\my" list matching files and folders?