[PyQt] Wretched horizontal scrolling of QTreeWidget on Linux

Edward K. Ream edreamleo at gmail.com
Tue Nov 18 13:11:34 GMT 2008


On XP, a QTreeWidget never scrolls horizontally automatically, and
that works well in practice.

On Linux, a QTreeWidget will typically scroll horizontally when an
item to the right of the present item is selected programatically,
i.e., not with the mouse, but with code triggered from a keystroke.
Worse, scrolling doesn't get restored to zero horizontal offset when a
"leftward" item is selected.  Not good.

I don't see any options/methods that have any chance of affecting
this. Saving and restoring scrollbar positions does not work.
Presumably one could dig deep into QAbstractScrollArea to save and
restore the underlying scroll rect, but this is going to be far from
fun.

Anyone have any suggestions, or sample code? Thanks.

Edward
--------------------------------------------------------------------
Edward K. Ream email: edreamleo at gmail.com
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------


More information about the PyQt mailing list