Is there any way to animate QAction button on panel ?
-
I've got some QTabBar with some QActions on it. And I want to make some animation of one of it's actions. For example with the help of 5-6 images. I know that I can make some timer and slot when I will change action's icon for each tick(). But is there any other more standard way to do this ?
-
I think I'd not manipulate the QAction, but create a button that runs the animation instead. Recognize that QAction is not a widget. A QAction put on a QToolBar (not a QTabBar, that one draws tabs) is represented by a QToolButton. You could make your own QToolButton, and for instance put a QLabel on which you put a QMovie. Then, either set that button manually on the tool bar, or wrap the widget in a QWidgetAction.