Skip to content

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

@hawkeye64

Description

@hawkeye64

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions