Since I hate my work right now and the van Damme movie, I currently watch, sucks, I am gentile and post the code I was thinking of...
/// local timer t.
XX::XX()
{
t.setSingleShot(true);
connect(&t, SIGNAL(timeout()), this, SLOT(timerslot()));
}
XX::timerslot()
{
// if you want do so something right here, if not, you could
// direct emit the signal in the connect statement.
emit mouseFor3SecondsOverWidget();
}
XX::enterEvent()
{
t.start(3000);
}
XX::enterLeave()
{
t.stop();
}
/// local timer t.
XX::XX()
{
t.setSingleShot(true);
connect(&t, SIGNAL(timeout()), this, SLOT(timerslot()));
}
XX::timerslot()
{
// if you want do so something right here, if not, you could
// direct emit the signal in the connect statement.
emit mouseFor3SecondsOverWidget();
}
XX::enterEvent()
{
t.start(3000);
}
XX::enterLeave()
{
t.stop();
}
To copy to clipboard, switch view to plain text mode
Bookmarks