How to make a QTool tip show when a button is pressed / clicked
Unsolved
General and Desktop
-
-
@ManiRon said in How to make a QTool tip show when a button is pressed / clicked:
the tool tip is not showing till what ever time i have specified ?
What do you mean? You want to have a delay before showing the tool tip? If so then why not using QTimer?
-
Hi
Works on linux and windows for me. (Qt 5.9)
it stays the time you tell it.
Do note however, you CANNOT click on the screen in the meantime. then it goes away at once. -
@mrjj it display the tool tip only for few milli seconds , is there something wrong i am doing ?
QRect rect; rect.setHeight(ui->pushbtn->height()); rect.setWidth(ui->pushbtn->width()); QToolTip::showText( this->mapToGlobal( QPoint( 0, 0 ) ), qTable,ui->pushbtn,rect,5000);
-
Maybe related to https://bugreports.qt.io/browse/QTBUG-18520
-
QRect rect; rect.setHeight(ui->pushbtn->height()); rect.setWidth(ui->pushbtn->width()); this->setToolTipDuration(5000); QToolTip::showText( this->mapToGlobal( QPoint( 0, 0 ) ), qTable,this,rect,5000);
tried something like this but no change
-
Hi
What Qt version are you using?
It works for me with Qt5.9/5.13 on Windows and Linux.