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
parent
5944c2503c
commit
85357472d0
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue