View Single Post
Old 01-25-2022, 05: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,221
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 05:34 PM.
capink is offline   Reply With Quote