[PyQt] QTreeView (and QTreeWidget) horizontal scroll bar jumping

Thomi Richards thomir at gmail.com
Mon Apr 7 04:37:18 BST 2014


Hi,

On 7 April 2014 14:21, Doug Bell <dougb at bellz.org> wrote:

> I fixed this problem in my TreeLine program by overriding the
> QTreeView::scrollTo method as shown below:
>

Thanks - that certainly fixes that problem.

Now I'm trying to get it so that navigating (with the arrow keys) to items
in the tree view that are either off to the RHS of the currently shown
viewport, or off the bottom of the viewport causes the scroll bars to shift
so the item is in view.

I tried hooking the model's selectionChanged signal up to the new patched
scrollTo method, but I'm pretty sure that's already called - in any case,
it made no difference.

Any ideas?

Cheers,
-- 
Thomi Richards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140407/36eb0054/attachment.html>


More information about the PyQt mailing list