Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Add setExpandedNodes([]) to QTree #2737

Closed
hawkeye64 opened this issue Nov 7, 2018 · 1 comment
Closed

[Enhancement] Add setExpandedNodes([]) to QTree #2737

hawkeye64 opened this issue Nov 7, 2018 · 1 comment

Comments

@hawkeye64
Copy link
Member

hawkeye64 commented Nov 7, 2018

The setExpandedNodes([]) function would take an array of node keys. The code would walk the array items and for each node that has not been lazy loaded, call the lazyLoad function and then the expansion.
This would be particulary useful where children of child nodes are known, but not yet loaded.
For instance, if using a QTree to visualize the User's HD in an Electron environment, one could call (on windows):
setExpandedNodes(['C:\Users', 'C:\Users\Hawkeye64', C:\Users\Hawkeye64\Videos])
and the final node expanded would be 'C:\Users\Hawkeye64\Videos' even if 'C:\Users\Hawkeye64' had not previously been expanded or previously lazy loaded (it would lazy load it them move to the next one).

@rstoenescu
Copy link
Member

There's setExpanded() method (at least in v1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants