I would like to show a file browser on my PyQt6 Window, and succeeded, but the header shows all columns we could see in a plain windows files explorer (name, type, size, etc.), but I only want the name column to display.
I use QFileSystemModel to display the files, and I don't really know if I should change the header on the QFileSystemModel side or that of the QTreeView.
Here is my code to create the browser:
model = QFileSystemModel()
model.setRootPath('C:\\Projects\\Hypertraduction Tool')
tree = QTreeView()
tree.setModel(model)
tree.setRootIndex(model.index('C:\\Projects\\Hypertraduction Tool'))