View Single Post
Old 01-25-2022, 04:26 PM   #303
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
You can do it with a custom template function.

Code:
def evaluate(self, formatter, kwargs, mi, locals):
    from qt.core import QApplication
    if QApplication.instance().is_dark_theme:
        return 1
    else:
        return ''
function name: is_dark_theme
arg count: -1

Code:
program:
    is_dark_theme()

Last edited by capink; 01-25-2022 at 04:34 PM.
capink is offline   Reply With Quote