Thank you minorpan, your advice was excellent!

However, I have one more question:
with your advice resizing works automatically OK otherwise, but not in case the window is resized (the user drags with her mouse from the corner of the window and enlarges or shrinks it). When I try to cover also that by re-defining the event-handling for the appropriate event:

void MyTreeWidget::resizeEvent( QResizeEvent* event)
{
QTreeWidget::resizeEvent( event);

// in addition to plain old resizing update the column widths:
updateColumnWidth(); // minorpan's function
};


it works... almost. With my application I am always able to find such a tree expansion/window size combination, that after the window has been resized with the mouse, the scollbars flick enourmously and the PC CPU usage is close to 100%. How should I implement the resize-support properly?
- Jorma