DigviJay Patil DigviJay Patil - 1 year ago 110
C++ Question

How to repaint QTreeWidget?

I have QTreeWidget. In which I'm adding new column dynamically on button click event using setHeaderLabels. This API add new column in

but column is not visible in current
area. It adds a scroll bar in
. Therefore to view newly added column user has to scroll the tree.
This my scenario but I don't want to scroll. I have used update() function even though its not showing new column. Is there any way to repaint the widget.
Thank you !

Answer Source



at the initialization and


each time your adding a column.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download