How to set animated icon to QPushButton in Qt5?
问题 QPushButton can have icon, but I need to set animated icon to it. How to do this? I created new class implemented from QPushButton but how to replace icon from QIcon to QMovie ? 回答1: This can be accomplished without subclassing QPushButton by simply using the signal / slot mechanism of Qt. Connect the frameChanged signal of QMovie to a custom slot in the class that contains this QPushButton . This function will apply the current frame of the QMovie as the icon of the QPushButton . It should