qtreeview

QTreeView column header width is too large

QTreeView column header width is too large Question: I am trying to set up a simple QTreeView with nice columns. The first two columns are set to fit the contents, the last column is set to stretch. For some reason, the minimum width of the last column ("Balance") is way higher than it needs to …

Total answers: 1

In Python PyQt6, Why is my QTreeView displaying white icons instead of folder icons from QStandardItemModel?

In Python PyQt6, Why is my QTreeView displaying white icons instead of folder icons from QStandardItemModel? Question: I am attempting to add a folder icon for the folder items in my directory, along with the icons for the associated file type. iconProvider = QFileIconProvider() for item in os.listdir(path): QItem = QStandardItem(item) file_item_icon = iconProvider.icon(QFileInfo(item)) QItem.setIcon(file_item_icon) …

Total answers: 1

Editing entries of QTreeView with QFileSystemModel

Editing entries of QTreeView with QFileSystemModel Question: I have written a program to en/decyrpt files and folders (including the names of them). The encrypted folder looks like that: – rootFolder: folder – 19479: folder 91039 file 49761 file – 06937: folder Next, I wanted to make a TreeView to represent the folder structure with the …

Total answers: 1