def setTheme(self, theme):
        # Collect list of windows not having the current or future theme
        toBeUpdated = list()
        oldAppTheme = self.getTheme()

        for w in self.getWindows():
            windowTheme = w.getTheme()
            if ((windowTheme is None) or (not (windowTheme == theme) and windowTheme == oldAppTheme)):
                toBeUpdated.append(w)

        # Updates the theme
        self.theme = theme

        # Ask windows to update themselves
        for w in toBeUpdated:
            w.requestRepaint()
Sets the application's theme.
dataset/ETHPy150Open rwl/muntjac/muntjac/application.py/Application.setTheme