Skip to content

Conversation

@JustKanade
Copy link
Contributor

NavigationTreeWidget - 树状菜单展开状态记忆功能

参照 WinUI Gallery NavigationView,为 QFluentWidgets 的导航树状菜单添加 展开状态记忆功能

当侧边栏折叠再展开时,之前展开的树状菜单会自动恢复展开状态。

2025-12-0720-47-25-ezgif.com-gif-maker.mp4

演示


API

NavigationTreeWidget.setRememberExpandState()

启用树状导航项的展开状态记忆功能:

# 启用展开状态记忆
self.navigationInterface.widget('Album-Interface').setRememberExpandState(True)
self.navigationInterface.widget('Album-Interface-1').setRememberExpandState(True)

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

Successfully merging this pull request may close these issues.

1 participant