Unsolved QToolTip::showText disappears after mouse relese
-
Inside a mousePressEvent I do
QToolTip::showText(evt->globalPos(), "Test", this, rect(), 1000);
But the tooltip disappears after releasing the mouse button.
-
@BentF7 said:
Inside a mousePressEvent I do
QToolTip::showText(evt->globalPos(), "Test", this, rect(), 1000);
But the tooltip disappears after releasing the mouse button.
Are you sure it disappears right after releasing the mouse button and not after 1second?
-
@the_ Yes, I am. If I don't release the mousebutton it disappears after 1 second.
-
Hi
It seems to be an effect of calling it from mousePress.
As doc says , normally you would intercept QEvent::ToolTip and
there show call QToolTip::showTextbool widget::event(QEvent* event) {
if (event->type() == QEvent::ToolTip) {
QHelpEvent* helpEvent = static_cast<QHelpEvent*>(event);
..