I have bound a QFileSystemModel to a QTreeView. The QFileSystemModel has readOnly set to false so the user can rename files... However I don't want the user to accidentally rename a file and forget its extension as that will result in its exclusion from the QTreeView since I am filtering the file types...
How can I hide the file extensions keeping the rename functional ?
Thanks
You must create an item delegate specific for your situation, and associate it with your view.
As stated in the documentation here
This delegate will be the responsible of displaying the name of the file without extension, and allow the editing of the file name.