Duration of a ToolTip
-
This post is deleted!
-
@vale88 said in Duration of a ToolTip:
It works
HOW?!
QToolTip * b; a= QString("%1 , %2").arg(x).arg(y); b->showText(g, a );
should mercilessly crash
-
@VRonin I wrote:
CustomPlotZoom::CustomPlotZoom(QWidget * parent)
: QCustomPlot(parent)
, mZoomMode(false)
, mRubberBand(new QRubberBand(QRubberBand::Rectangle, this))
{
setToolTipDuration(3000);
}and:
QToolTip::showText(g, a ,this);
but it doesn't work -
I'm retarded, sorry. http://doc.qt.io/qt-5/qtooltip.html#showText-2
QToolTip::showText(g, a, this, QRect(), 30000);
-
@VRonin said in Duration of a ToolTip:
QToolTip::showText(g, a, this, QRect(), 30000);
It doesn't work..maybe it's because it's connected to mouse event? I don't understand
-
@vale88 said in Duration of a ToolTip:
It doesn't work
Define "doesn't work".
- Crashes
- Doesn't show the popup at all
- Shows the popup but not for 30secs
-
Hi
Just as a note.
I tried the code
QToolTip::showText(g, a, this, QRect(), 30000);
from a button's clicked.
It will stay for 30 secs IF you do not move the mouse.
If you mouse the mouse - it vanish a few sec later.
So i think that is what you are seeing. -
This post is deleted!