summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorThomas Sondergaard <ts@medical-insight.com>2009-07-24 13:56:05 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-24 14:03:55 (GMT)
commit11985909ddb17283e392244ee72ed54baa9a7339 (patch)
tree26e825ef5b0c68e7a352b2540cdb45effd213672 /src/gui/graphicsview
parenta588ca19acd2f0f6a55426a30d8ef029d8dbb99b (diff)
downloadQt-11985909ddb17283e392244ee72ed54baa9a7339.zip
Qt-11985909ddb17283e392244ee72ed54baa9a7339.tar.gz
Qt-11985909ddb17283e392244ee72ed54baa9a7339.tar.bz2
Specify widget when calling QToolTip::showText() to make sure the tool tip ends up on the right X11 screen.
Merge-request: 987 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 4796436..9b6414d 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -3457,7 +3457,7 @@ void QGraphicsScene::helpEvent(QGraphicsSceneHelpEvent *helpEvent)
text = toolTipItem->toolTip();
point = helpEvent->screenPos();
}
- QToolTip::showText(point, text);
+ QToolTip::showText(point, text, helpEvent->widget());
helpEvent->setAccepted(!text.isEmpty());
#endif
}
@@ -3556,8 +3556,7 @@ void QGraphicsScenePrivate::leaveScene()
{
Q_Q(QGraphicsScene);
#ifndef QT_NO_TOOLTIP
- // Remove any tooltips
- QToolTip::showText(QPoint(), QString());
+ QToolTip::hideText();
#endif
// Send HoverLeave events to all existing hover items, topmost first.
QGraphicsView *senderWidget = qobject_cast<QGraphicsView *>(q->sender());