How do I remove header labels from my tree view?
-
If you just set the header labels with "model.setHorizontalHeaderLabels", it will still keep the old labels if the list of new labels is shorter than the previous labels. For example:
self.setHorizontalHeaderLabels(["test", "test2"]) self.setHorizontalHeaderLabels(["test3"])After running this code in my item model, the header looks like this:

Clearly "test" was overwritten, but test2 stays. How can I remove test2? There are no items that go in its column.
-
If you just set the header labels with "model.setHorizontalHeaderLabels", it will still keep the old labels if the list of new labels is shorter than the previous labels. For example:
self.setHorizontalHeaderLabels(["test", "test2"]) self.setHorizontalHeaderLabels(["test3"])After running this code in my item model, the header looks like this:

Clearly "test" was overwritten, but test2 stays. How can I remove test2? There are no items that go in its column.
Hi,
Use an empty string for that column.