I need to show a "help text" when the mouse is over a pushbutton, I googled and I tried some code but in vain.
Can anyone correct it to me?
if (event->type() == QEvent::Enter)
{
if (obj == q1)
{
iarm->printStatus("hi"); // For debugging
QAction *newAct = new QAction(tr("&New"), this);
newAct->setShortcut(tr("Ctrl+N"));
newAct->setStatusTip(tr("Create a new file"));
newAct->setWhatsThis(tr("Click this option to create a new file."));
}
}