Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yjg30737/pyqt-ani-button

PyQt QPushButton for animation
https://github.com/yjg30737/pyqt-ani-button

pyqt pyqt-examples pyqt-gui pyqt5 pyqt5-gui qabstractanimation qpropertyanimation qpushbutton qt qt-examples qt5

Last synced: about 5 hours ago
JSON representation

PyQt QPushButton for animation

Awesome Lists containing this project

README

        

# pyqt-ani-button
PyQt QPushButton for animation

## Requirements
* PyQt5 >= 5.8

## Setup
`python -m pip install pyqt-ani-button`

## Included Package
* pyqt-ani-abstractbutton

## Example
```python
from PyQt5.QtWidgets import QApplication, QWidget, QHBoxLayout
from pyqt_ani_button import AniButton

class Widget(QWidget):
def __init__(self):
super().__init__()
self.__initUi()

def __initUi(self):
lay = QHBoxLayout()
for i in range(5):
btn = AniButton()
btn.setFixedSize(30, 15)
lay.addWidget(btn)
self.setLayout(lay)

if __name__ == "__main__":
import sys

app = QApplication(sys.argv)
ex = Widget()
ex.show()
sys.exit(app.exec_())
```

Result

https://user-images.githubusercontent.com/55078043/171344503-f092e025-8329-447a-a02e-a7ca88b5c859.mp4

Perhaps this is not the animation you expected.

I'm working on button which is able to do color transition animation.