diff -r 93b982ccede2 -r 5daf16870df6 src/gui/graphicsview/qgraphicsproxywidget.cpp --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp Mon Jun 21 22:38:13 2010 +0100 +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp Thu Jul 22 16:41:55 2010 +0100 @@ -975,6 +975,7 @@ d->styleChangeMode = QGraphicsProxyWidgetPrivate::NoMode; } break; +#ifndef QT_NO_TOOLTIP case QEvent::ToolTipChange: // Propagate tooltip change to the proxy. if (!d->tooltipChangeMode) { @@ -983,6 +984,7 @@ d->tooltipChangeMode = QGraphicsProxyWidgetPrivate::NoMode; } break; +#endif default: break; } @@ -1024,9 +1026,18 @@ // Map event position from us to the receiver pos = d->mapToReceiver(pos, receiver); + QPoint globalPos = receiver->mapToGlobal(pos.toPoint()); + //If the receiver by-pass the proxy its popups + //will be top level QWidgets therefore they need + //the screen position. mapToGlobal expect the widget to + //have proper coordinates in regards of the windowing system + //but it's not true because the widget is embedded. + if (bypassGraphicsProxyWidget(receiver)) + globalPos = event->screenPos(); + // Send mouse event. ### Doesn't propagate the event. QContextMenuEvent contextMenuEvent(QContextMenuEvent::Reason(event->reason()), - pos.toPoint(), receiver->mapToGlobal(pos.toPoint()), event->modifiers()); + pos.toPoint(), globalPos, event->modifiers()); QApplication::sendEvent(receiver, &contextMenuEvent); event->setAccepted(contextMenuEvent.isAccepted());