On 31.07.08 21:37:04, Chris M wrote:
> Not sure if there is a 'cleaner' solution but overriding the event is
> fairly simple, for example;
>
> class MyTreeWidget(QTreeWidget):
> def __init__(self, parent = None):
> super(MyTreeWidget, self).__init__(parent)
>
> def resizeEvent(self, event):
> width = event.size().width()
> self.setColumnWidth(1, 100)
> self.setColumnWidth(2, width - 100)
This doesn't take into account any headers or scrollbars so it won't
work.
What should work however is setting the last column to a fixed size via
the horizontal headerview. See QTreeView.horizontalHeader() and
QHeaderView.
Andreas
--
Don't worry. Life's too long.
-- Vincent Sardi, Jr.
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt