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? -
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. -
Hi
Np.
Well Stylesheets are not meant for animations as such.What type of animation did you have in mind ?
Maybe this can inspire you
https://github.com/laserpants/qt-material-widgets