PDA

View Full Version : QPushButton with blinking boundary



giovanni.foiani
8th August 2012, 10:21
Hi all,

this is my first post in this forum.
I need to setup a button which changes its background color depending on some application parameters and has a boundary that blinks when pressed.
At this moment I put the button inside a QFrame a little bit larger than the button so, the application tells the button to change its background in certain situations and when the button is pressed the Qframe background blinks thanks to a timer. The effect I want to create is that only the larger part of the Frame should be visible during the blink making a sort of boundary to identify the pressed button.
The problem is that the Qframe background color covers the button when blinks, I suppose because the button has autofillbackground property setted.

Which is the best way to solve this problem? (Also solutions different from mine..)

Any help is appreciated, thanks.

Giovanni

sonulohani
8th August 2012, 15:17
Use stylesheet for changing the background and the border of the QPushButton.

giovanni.foiani
9th August 2012, 10:47
Using this solution it works.

thanks

Giovanni