Important: Please read the Qt Code of Conduct -

QStyle animations

  • Hello,
    I'm currently trying to write a custom style by subclassing QProxyStyle.
    What i want to achieve now is to animate the color changes to buttons when they are hovered, as it is done in QWindowsVistaStyle, for example.
    Is there a good way to do this with QStyle?

  • Lifetime Qt Champion

    Hi and welcome to the forums
    Well it's possible but I think subclassing a QPushButton and use a QPropertyAnimation might be easier.

    Maybe you can use the QProxyStyle. never tried animation with it though.

    So is the goal to have a 100% normal looking button with animated background color
    or would a more custom looking one also do ?

  • I'm sorry for the late reply;
    No, the button needn't look normal because I already use a customized QStyle in my application. But the problem that comes with this is that I cannot use stylsheets with QPropertyAnimations for the animation like I'd normally do.

Log in to reply