https://github.com/j-city/pyqt5notification
Tiny script for notification in pyqt5
https://github.com/j-city/pyqt5notification
Last synced: over 1 year ago
JSON representation
Tiny script for notification in pyqt5
- Host: GitHub
- URL: https://github.com/j-city/pyqt5notification
- Owner: J-CITY
- License: mit
- Created: 2019-07-19T13:20:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-27T16:05:37.000Z (over 1 year ago)
- Last Synced: 2025-02-27T20:51:24.238Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 9.85 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pyqt5 Notification
Tiny script for cross platform notification with pyqt5
It could use [BlurWindow](https://github.com/Peticali/PythonBlurBehind) if you want blur background
## Dependencies
PyQt5
```
python -m pip install PyQt5
```
If you want blur background
```
python -m pip install BlurWindow
```
## Examples:

```python
# use for material ui widgets style
from qt_material import apply_stylesheet
app = QtWidgets.QApplication(sys.argv)
toast = Toast("SIMPLE TITLE", "SIMPLE MESSAGE", "images.png")
# init material ui style
apply_stylesheet(app, theme='dark_teal.xml')
toast.show()
sys.exit(app.exec_())
```

```python
from qt_material import apply_stylesheet
app = QtWidgets.QApplication(sys.argv)
toast = Toast()
toast.setTitle("Some Title")
toast.setMessage("This is notification for you")
toast.setImage("images.png")
toast.setTextAlign(TextAlign.LEFT)
toast.setUseBlurBg(True)
toast.setAnimPosOffset(30, 0)
toast.setAnimPosCurve(CurveType.IN_CUBIC)
toast.setAnimFadeCurve(CurveType.IN_CUBIC)
toast.config.BUTTONS["btn1"] = Button("Play")
toast.setSound("sound.wav")
apply_stylesheet(app, theme='dark_teal.xml')
toast.show()
sys.exit(app.exec_())
```