PDA

View Full Version : if a QPushbutton (or QToolButton) is setFocus enlarge it [like Mac style]



mansu
15th March 2009, 17:44
Hi to everyone, i would just know if it is possible to create an effect like the "Mac appbar" (or wbar on *unix system)....
In details, when a QPushbutton (or QToolButton) is setFocus enlarge it.
I created this effect but only if i click the button, not if i setFocus the button.
can anyone help me?

wysota
15th March 2009, 20:02
Yes, it's possible. First you need to make sure you do mean focus. If you do then focusInEvent() and focusOutEvent() are for you. If you meant "hover" then you need to enable mouse tracking for your widget and react on enterEvent() and leaveEvent().