Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/qt-material-theme-playground
Qt material theme playground (changing theme during runtime)
https://github.com/yjg30737/qt-material-theme-playground
pyqt pyqt-examples pyqt5 pyqt5-desktop-application pyqt5-examples pyqt5-gui qt-material qt-material-widgets
Last synced: 18 days ago
JSON representation
Qt material theme playground (changing theme during runtime)
- Host: GitHub
- URL: https://github.com/yjg30737/qt-material-theme-playground
- Owner: yjg30737
- License: mit
- Created: 2024-03-05T08:57:40.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-12T11:06:03.000Z (9 months ago)
- Last Synced: 2024-12-29T08:42:09.882Z (22 days ago)
- Topics: pyqt, pyqt-examples, pyqt5, pyqt5-desktop-application, pyqt5-examples, pyqt5-gui, qt-material, qt-material-widgets
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qt-material-theme-playground
Qt material theme playground (changing theme during runtime)## Requirements
* PyQt5
* qt-materialThis will work in PyQt6, PySide6 as well.
## How to Run
1. git clone ~
2. pip install -r requirements.txt
3. python main.py## Preview
### Changing theme during runtimehttps://github.com/yjg30737/qt-material-theme-playground/assets/55078043/4f0d70fa-11bd-4e46-8d2b-c2012e16f01a
The creator of qt-material prefers to use QtStyleTools but i don't think it is good practice to use multiple inheritence.
Beside, changing theme in runtime is perfectly working without using that.### If you press the run button dialog will pop up.
The theme is applied in the dialog as well.
![image](https://github.com/yjg30737/qt-material-theme-playground/assets/55078043/e5afe67d-5b66-474d-af76-1e2b3753ecdd)
### Note
font_size won't work for some reasons. So you have to set font by yourself like this:```python
QApplication.setFont(QFont('Arial', 12))
```If you want to switch font during runtime, you can refer to pyqt-font-dialog.