2
QTreeWidget을 사용하여 여러 열의 항목을 표시하고 열 이름이있는 헤더를 갖고 싶습니다. 여기 QHeaderView에서 섹션 이름 변경
그것을 어떻게해야 내 코드의 조각입니다 (하지만하지 않습니다) : 그러나, 나는 단지이 스크린 샷과 같이 번호를 얻을
class BugsList(QtGui.QDialog):
def __init__(self, parent, reports):
super(BugsList, self).__init__(parent) # Call QDialog constructor
# ...
self._tree = QtGui.QTreeWidget(self)
self._tree.setColumnCount(4))
header = QtGui.QHeaderView(QtCore.Qt.Horizontal)
header.addActions([QtGui.QAction(x, header) for x in ('one', 'two', 'three', 'four')])
self._tree.setHeader(header)
# ...
감사를
Valentin Lorentz