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

Usage without .ui files #100

Open
jwaggy opened this issue Aug 13, 2023 · 1 comment
Open

Usage without .ui files #100

jwaggy opened this issue Aug 13, 2023 · 1 comment

Comments

@jwaggy
Copy link

jwaggy commented Aug 13, 2023

from PySide6.QtWidgets import QApplication, QMainWindow
from PySide6.QtUiTools import QUiLoader
from qt_material import QtStyleTools


########################################################################
class RuntimeStylesheets(QMainWindow, QtStyleTools):
    # ----------------------------------------------------------------------
    def __init__(self):
        """"""
        super().__init__()
        self.main = QUiLoader().load('main_window.ui', self)

        self.add_menu_theme(self.main, self.main.menuStyles)


if __name__ == "__main__":
    app = QApplication()
    frame = RuntimeStylesheets()
    frame.main.show()
    app.exec_()

In the examples that use QtStyleTools they all use QUiLoader, is that a requirement?

@jwaggy
Copy link
Author

jwaggy commented Jul 19, 2024

Is this project no longer maintained?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant