Hello guys,
I want to ask, is there a way to create QPushButton fade effect between two images or gradients without gif animation. Actually I want to create effect like this flash menu: http://forums.bots-united.com/.
Thanks,
Damyan Kostanev
Hello guys,
I want to ask, is there a way to create QPushButton fade effect between two images or gradients without gif animation. Actually I want to create effect like this flash menu: http://forums.bots-united.com/.
Thanks,
Damyan Kostanev
You can use timer for that. On mouse hover, start the timer... and change the color/alpha of the button.
or use Style sheets
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
But can style sheets give fading effect ? just wondering...
see an example of style sheet in Qt's example dir
Qt Code:
background-color: khaki; }To copy to clipboard, switch view to plain text mode
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
you should have two pic: the first one for normal state and the second one for hover state and then change it.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
@spirit I think that you understand Kostanev wrong.
For me it looks like he have putted wrong thread title. It seems that he want animated fade effect. The timer option is good but I wonder too is there an easyer way to do that.
I am afraid that The Storm is right. The fault is mine.
I meant that I don't want to use external (GIF) animation, I want to create the effect between two images with Qt.
in this case you can use aamer4yu's suggest.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
You can check this example .
It might help you
Kostanev (12th November 2008)
Thank you! I will test it asap...
Bookmarks