PDA

View Full Version : Button Effects



hiro
29th June 2010, 19:06
Hi,everyone=)

l'm trying to create a button with icon , which when mouse over the icon button can show zoom effect like the bellow image shows :

http://j.imagehost.org/0786/mouseOverEffect.jpg

when mouse over the icon button , the icon button zoomed in , and the other icon buttons are slightly changed they position .


class ZoomButton : public QToolButton
{
...
void mousePressEvent(QEvent *event);
...
};

void ZoomButton::mousePressEvent(QEvent *event)
{
...zoomFunction(...)...
}

This is what l'm doing now , but failed .

Can some one help please .

squidge
29th June 2010, 19:27
Override the buttons paint event.

hiro
30th June 2010, 05:04
fatjuicymole , thanks for you advise.

l will try this method .

hiro
4th July 2010, 18:23
Hi ,

Problem comes again .

When mouse overed the button , these is no interact with each other .

And l have no idea , how to solve it .

http://a.imagehost.org/0634/ButtonEffects.jpg