| 1 |
from PySide6.QtWidgets import QApplication, QMainWindow |
| 2 |
from PySide6.QtUiTools import QUiLoader |
| 3 |
from qt_material import apply_stylesheet |
| 4 |
import os |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
class RuntimeStylesheets(QMainWindow): |
| 9 |
|
| 10 |
def __init__(self): |
| 11 |
"""""" |
| 12 |
super().__init__() |
| 13 |
self.main = QUiLoader().load('main_window.ui', self) |
| 14 |
self.main.pushButton_2.setProperty('class', 'big_button') |
| 15 |
|
| 16 |
|
| 17 |
if __name__ == "__main__": |
| 18 |
app = QApplication() |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
apply_stylesheet(app, theme='light_blue.xml', css_file='custom.css') |
| 28 |
|
| 29 |
frame = RuntimeStylesheets() |
| 30 |
frame.main.show() |
| 31 |
app.exec_() |