QToolTip::mouseMoveEvent(): always call base class

QLabel::mouseMoveEvent() only called the base class implementation when
a rect was given to showText which could lead to inconsistent behavior.

Change-Id: I3e537ba5ae7c3c67715975624d1ee9f0c04fa9a7
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
bb10
Christian Ehrlicher 2018-07-28 14:29:36 +02:00
parent 5944c2503c
commit 85357472d0
1 changed files with 7 additions and 7 deletions

View File

@ -264,13 +264,13 @@ void QTipLabel::resizeEvent(QResizeEvent *e)
void QTipLabel::mouseMoveEvent(QMouseEvent *e)
{
if (rect.isNull())
return;
QPoint pos = e->globalPos();
if (widget)
pos = widget->mapFromGlobal(pos);
if (!rect.contains(pos))
hideTip();
if (!rect.isNull()) {
QPoint pos = e->globalPos();
if (widget)
pos = widget->mapFromGlobal(pos);
if (!rect.contains(pos))
hideTip();
}
QLabel::mouseMoveEvent(e);
}