diff options
author | Yoann Lopes <yoann.lopes@nokia.com> | 2010-04-15 08:41:18 (GMT) |
---|---|---|
committer | Yoann Lopes <yoann.lopes@nokia.com> | 2010-04-15 10:29:27 (GMT) |
commit | 9da13ea53aec6d841ba7f416531d6c52d4368df4 (patch) | |
tree | 1930b996312a87026046f8c8fa040b78bafb9912 /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | 9dcf1eabc373991340b0c0b697f5b0788fde4f4b (diff) | |
download | Qt-9da13ea53aec6d841ba7f416531d6c52d4368df4.zip Qt-9da13ea53aec6d841ba7f416531d6c52d4368df4.tar.gz Qt-9da13ea53aec6d841ba7f416531d6c52d4368df4.tar.bz2 |
Fixes tooltips for QGraphicsProxyWidget.
Help event was not propagated to the widget. Also fixes tooltip value
propagation when setting it on the proxy or on the widget.
Autotest included.
Task-number: QTBUG-5349
Reviewed-by: bnilsen
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 6581727..b368a82 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -3772,6 +3772,12 @@ void QGraphicsScene::helpEvent(QGraphicsSceneHelpEvent *helpEvent) QGraphicsItem *toolTipItem = 0; for (int i = 0; i < itemsAtPos.size(); ++i) { QGraphicsItem *tmp = itemsAtPos.at(i); + if (tmp->d_func()->isProxyWidget()) { + // if the item is a proxy widget, the event is forwarded to it + sendEvent(tmp, helpEvent); + if (helpEvent->isAccepted()) + return; + } if (!tmp->toolTip().isEmpty()) { toolTipItem = tmp; break; |