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

[Bug]: Incorrect theme change #847

Closed brandonzorn closed 5 months ago

brandonzorn commented 6 months ago

What happened?

incorrect theme change

https://github.com/zhiyiYo/PyQt-Fluent-Widgets/assets/68778953/bdc8728d-46ab-4029-af07-198954acb9a5

Operation System

Windows11 23H2

Python Version

3.12.3 x64

PyQt/PySide Version

PySide6 6.6.3.1

PyQt/PySide-Fluent-Widgets Version

1.5.5

How to Reproduce?

Run the code below and change the theme in Windows settings from dark to light

Minimum code

import sys
from PySide6.QtWidgets import QApplication
from qfluentwidgets import FluentWindow, setTheme, Theme

setTheme(Theme.DARK)
app = QApplication(sys.argv)
window = FluentWindow()
window.show()
sys.exit(app.exec())
AmirMahdaviAM commented 6 months ago

Suggest you to use gallery app as template and build your app on it, otherwise you must set custome stylesheet to prevent from this inconsistency