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

修复跟随系统主题功能无法正常运行 #1041

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kowyo
Copy link

@kowyo kowyo commented Jan 22, 2025

相关 issue: #931#806

已经在本地进行测试,欢迎指出问题

@zhiyiYo
Copy link
Owner

zhiyiYo commented Jan 22, 2025

之前的修复方案不能用吗?

@kowyo
Copy link
Author

kowyo commented Jan 22, 2025

#931 的解决方案是关闭云母特效,但是我在 macOS/Windows 测试中并未开启云母

#806 的解决方案是:你需要捕获 applicationTheme.optionChanged 信号并调用 setTheme 来切换

但是我觉得略显麻烦而且官网文档未提及。

这个 PR 的好处是当你跟随官网文档使用 theme_listener 的时候可以确保生效,否则按照目前官网的例子,重写 _onThemeChanged,增加重试机制仍然无法使主题更换

已经在 macOS/Windows 平台测试此 PR

@kowyo
Copy link
Author

kowyo commented Jan 22, 2025

这个 PR 会在终端报错:QBasicTimer::start: Timers cannot be started from another thread

@kowyo kowyo marked this pull request as draft January 22, 2025 14:31
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.

2 participants