[PyQt] QTreeWidget and fixed column widths on window resize

Tyler Distad tyler.distad at gmail.com
Thu Jul 31 20:32:54 BST 2008


I am attempting to create a QTreeWidget containing two columns. The
rightmost column is to remain at a fixed width, no matter how large
the window itself grows. The leftmost column is to grow in the normal
manner. (Picture the playlist columns in your favorite music player,
and you probably have exactly what I'm attempting.)

However, I am completely unable to restrict the growth of the
right-hand component. The only suggestion I can find online deals with
overloading resizeEvent(), which seems ludicrously complicated for
something like this. Is there any sort of a clean solution?

Tyler Distad


More information about the PyQt mailing list