Search code examples
qtqwidgetqtreewidgetqtreewidgetitem

Why is there a 1 at the top of a QTreeWidget?


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


Solution

  • 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.