Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yjg30737/pyqt-transparent-button-background-animation-example
PyQt example of transparent button's background animation
https://github.com/yjg30737/pyqt-transparent-button-background-animation-example
button-animation pyqt pyqt-examples pyqt-tutorial pyqt5 pyqt5-examples qpropertyanimation qpushbutton qt qt-examples qt5 qt5-examples
Last synced: about 5 hours ago
JSON representation
PyQt example of transparent button's background animation
- Host: GitHub
- URL: https://github.com/yjg30737/pyqt-transparent-button-background-animation-example
- Owner: yjg30737
- License: mit
- Created: 2022-05-16T23:51:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-17T00:01:41.000Z (over 2 years ago)
- Last Synced: 2024-12-29T08:42:11.490Z (5 days ago)
- Topics: button-animation, pyqt, pyqt-examples, pyqt-tutorial, pyqt5, pyqt5-examples, qpropertyanimation, qpushbutton, qt, qt-examples, qt5, qt5-examples
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyqt-transparent-button-background-animation-example
PyQt example of transparent button's background animationThis example shows the transparent background button (button's text is visible) reveal the color with animation when you put the mouse cursor in it.
This can't be done by QGraphicsOpacityEffect which is normally used at opacity transition.
Because if you use QGraphicsOpacityEffect, everything become invisible at the transparent state.
So i use stylesheet instead.
## Requirements
* PyQt5 >= 5.8## Setup
`python -m pip install git+https://github.com/yjg30737/pyqt-transparent-button-background-animation-example.git --upgrade`## Example
Code Sample
```python
from PyQt5.QtWidgets import QApplication
from pyqt_transparent_button_background_animation_example import MainWindowif __name__ == "__main__":
import sysapp = QApplication(sys.argv)
ex = MainWindow()
ex.show()
sys.exit(app.exec_())
```Result
https://user-images.githubusercontent.com/55078043/168700640-05a64ab3-d09d-4bca-8e53-20677feba60f.mp4