[PyQt] Question on QTreeView, interactive expanding/collapsing

James Polk jpolk5001 at yahoo.com
Tue Apr 19 22:28:12 BST 2011

Whoops,...just found the *-hotkey,....nevermind, lol...

--- On Tue, 4/19/11, James Polk <jpolk5001 at yahoo.com> wrote:

From: James Polk <jpolk5001 at yahoo.com>
Subject: Question on QTreeView, interactive expanding/collapsing
To: pyqt at riverbankcomputing.com
Date: Tuesday, April 19, 2011, 2:09 PM

Greetings All,

In a typical QTreeView,...the default behaviour of clicking on a "plus box",
i.e. the branch boxes of the tree, yields a "single box open", or in the case
of collapsing, a "single box closed" event.

Is there any way to use a keyboard modifier, like SHIFT, CTRL, and/or ALT,
to expand or collapse the *whole* tree?

Many other similiar tree structures in other software have this feature.
For example, holding down CTRL and ALT and clicking on any box will
unfold/expand (or collapse) all nodes/branches from that node and all below.
Is there something I'm overlooking? Is this (re-)implementable ?

Many Thanks,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110419/e4291f5f/attachment.html>

More information about the PyQt mailing list