import app.env as env from qfluentwidgets import setTheme, Theme def switchTheme(theme): if theme == "dark": setTheme(Theme.DARK) env.theme = "dark" elif theme == "light": setTheme(Theme.LIGHT) else: setTheme(Theme.AUTO)