I have a QTreeView
(with PyQt4
) with custom and resized icons using the code below, but the Size column is displaying a wrong alignment/position, like so:
self.ui.treeView.setIconSize(QtCore.QSize(30,30))
fileSystemModel = QtGui.QFileSystemModel(self.ui.treeView)
custonIconProvider = CustomIconsProvider()
fileSystemModel.setIconProvider(custonIconProvider)
self.ui.treeView.setModel(fileSystemModel)
self.ui.treeView.setRootIndex(fileSystemModel.setRootPath(forlderPath))
self.ui.treeView.setColumnWidth(0, 250)
self.ui.treeView.setColumnWidth(1, 70)
self.ui.treeView.setColumnWidth(2, 70)
I've searched the http://pyqt.sourceforge.net/Docs/PyQt4/qtreeview.html documentation for a possible fix, but couldn't find anything evident.