문제

There is a 1 at the top of a QtreeWidget. How do i fix it?

도움이 되었습니까?

해결책

The value 1 is the columncount property, that, by default, assumes that value.

Your question was not very clear.

If you want to modify the label, you can use setHeaderLabel/setHeaderLabels functions.

If you want to hide the label, you can use setHeaderHidden function.

Please, before ask, use the Qt documentation.

다른 팁

By default qt designer puts 1 there, you need to edit it to suit your need from within qt designer or programatically using the docs.

This wll change the title of qlistwidget:

self.treeWidget.headerItem().setText(0, QtGui.QApplication.translate("Dialog", "xyz", None, QtGui.QApplication.UnicodeUTF8))

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top