Skip to content

yjg30737/pyqt-ani-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyqt-ani-button

PyQt QPushButton for animation

Requirements

  • PyQt5 >= 5.8

Setup

python -m pip install pyqt-ani-button

Included Package

Example

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

ani_button_example.mp4

Perhaps this is not the animation you expected.

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