forked from IPKM/nmreval
Display graph/set number in tree; fixes T243
This commit is contained in:
@ -231,5 +231,11 @@ class HeaderDelegate(QtWidgets.QStyledItemDelegate):
|
||||
|
||||
style = QtWidgets.QApplication.style()
|
||||
style.drawControl(QtWidgets.QStyle.CE_HeaderSection, header_option, painter)
|
||||
|
||||
text_rect = style.subElementRect(QtWidgets.QStyle.SE_ItemViewItemText, option, None)
|
||||
text_rect.adjust(2, 0, 0, 0)
|
||||
|
||||
if option.state & QtWidgets.QStyle.State_Selected:
|
||||
painter.fillRect(option.rect, option.palette.highlight())
|
||||
painter.fillRect(option.rect, option.palette.highlight())
|
||||
|
||||
painter.drawText(text_rect, option.displayAlignment, index.data(QtCore.Qt.DisplayRole))
|
||||
|
Reference in New Issue
Block a user