[PyQt] QTreeView scrolling on selection

Steve Borho steve at borho.org
Mon Nov 22 16:24:39 GMT 2010


We use a QTreeView to present a list of files in our commit tool.  The
view has 4 columns, the largest of which is the file name.  We don't
really like Qt's behavior of scrolling horizontally when an item is
selected, most of the time the user wants column 0 visible since it
has the file selection check boxes.

We have a hack in place which disables this horizontal scrolling:


But I was curious if anyone knew of a cleaner way to accomplish this.  Cheers.

Steve Borho

More information about the PyQt mailing list