QTreeWidget - Header always invisible
-
Can you show how ?
-
I have configured it with the pure designer - no code behind.
It seem to be a bug, because I found the following:
Disabling the header visible property disables it for ever. No effect by enabling it again.
(The preview shows no columns too, now.)Second bug: Changing the font changes only the row height of the data not of the headers.
and an other question: How can I change the width of the columns during design time?
-
I found something more.
It seems the setHeaderVisible(true) function has a bug. It updates not correct.
The "set to default" which is the true value, triggered by the default button in the property explorer works.Maybe it has to do with the opposite value of the QTreeView branch headerHidden.
Here works the switching. -
Did you add some data to your QTreeWidget ?
I don't remember if it's possible to change the width at design time.
-
Can you share somewhere your project to make it possible to test it ?
-
I use Creator 3.5.4 MSVC 5.5.1 32-bit
There is nothing special in my project, but when you cannot reproduce it I will send it.
Produce the bug:
Put a QTreeWidget on a dialog. The designer shows the columnname "1". The preview shows the same.
Disable and reenable the headerVisible: The designer shows the header but the preview and the running program not !
Click on the default Button for headerVisible: all works again.
(The effect in independent of the count of items in the view.) -
Can you test that again with Qt 5.6 Beta/RC ?
I just tried following your instructions (on OS X with a more recent build of Qt) and it didn't misbehave.