Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App hangs for a while when switching appearance #12

Open
gentlegiantJGC opened this issue Jul 24, 2022 · 1 comment
Open

App hangs for a while when switching appearance #12

gentlegiantJGC opened this issue Jul 24, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@gentlegiantJGC
Copy link
Member

I assume there is a bit of work being done in the background to load and parse the files.
There should be some indicator to the user that it is working.

@gentlegiantJGC gentlegiantJGC added the bug Something isn't working label Jul 24, 2022
@jevexendo
Copy link
Member

jevexendo commented Aug 3, 2022

This is definitely something I've looked into implementing, however the setStyleSheet method doesn't seem to provide a way to monitor progress.

In reality, there's not much that I'm doing when it comes to updating the application theme, most of the work is being taken care of by Qt. The following code is just about all I need to run to trigger the update:

    def apply(self, application: QApplication) -> None:
        """Apply theme to a `QtWidgets.QApplication`."""
        application.setStyle(self._theme["style"])
        application.setStyleSheet(self._style_sheets["application.qss"])

I'd love to find a callback, signal, or really just anything that gives feedback on what Qt is doing after I hand this off, but I haven't found a way to get that information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants