Yaa , Actuallly I implemented that what Marcel had told me
{
Q_OBJECT
public:
~MyButton();
protected:
virtual void enterEvent
( QEvent* );
virtual void leaveEvent
( QEvent* );
public signals:
}
void MyButton
::enterEvent( QEvent* e
) {
emit enter( text() );
}
void MyButton
::leaveEvent( QEvent* e
) {
emit leave( text() );
}
class MyButton : public QPushButton
{
Q_OBJECT
public:
MyButton( QWidget* = NULL );
~MyButton();
protected:
virtual void enterEvent( QEvent* );
virtual void leaveEvent( QEvent* );
public signals:
void enter( QString );
void leave( QString );
}
void MyButton::enterEvent( QEvent* e )
{
emit enter( text() );
}
void MyButton::leaveEvent( QEvent* e )
{
emit leave( text() );
}
To copy to clipboard, switch view to plain text mode
and also what u told
, that Main windows have a status bar and you can make it that it
displays the text you want when a widget is hovered.
But it wont works ,because what i want is this ,I am having 6 Push buttons on my main window,and each works differently ,When mouse cursor is over any button it displays the detail of that button in the label that i used.
Bookmarks