zhiyiYo / PyQt-Fluent-Widgets

A fluent design widgets library based on C++ Qt/PyQt/PySide. Make Qt Great Again.
https://qfluentwidgets.com
GNU General Public License v3.0
5.61k stars 541 forks source link

表格的列的字没有跟随主题 #172

Closed DancingSnow0517 closed 1 year ago

DancingSnow0517 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

Environment

Expected behavior 表格的列的字没有跟随主题,手动触发一次setTheme才变成白的字

Screenshots image

zhiyiYo commented 1 year ago

gallery里面应该是有跟随主题吧

zhiyiYo commented 1 year ago

同时建议升级到0.8.4

DancingSnow0517 commented 1 year ago

gallery里面应该是有跟随主题吧

gallery里面是有跟随的,但是不知道我这里就不生效了

zhiyiYo commented 1 year ago

贴一下最小复现代码吧

DancingSnow0517 commented 1 year ago

没能成功用最小代码复现,相关代码在这里https://github.com/DancingSnow0517/StarRail-gacha/blob/master/src/star_rail_gacha/app/pages/history_page.py

zhiyiYo commented 1 year ago

下述函数没有在初始化的时候调用的样子,而且也没必要把主题变化信号连接到这个槽函数上,因为 StyleSheet.HISTORY_PAGE.apply(self) 之后 qfluentwidgets 会自动帮你更换主题

def set_theme(self):
        StyleSheet.HISTORY_PAGE.apply(self)