- 
    Bug 
- 
    Resolution: Done
- 
    P3: Somewhat important 
- 
    None
- 
    5.6.0
- 
    None
- 
    Ubuntu 16.04 64 bit
- 
        474af0a61d6154006966a775d186687aa8881708 (qtbase/5.6, 14.5.2016, 5.6.1), 733459637 (dev), 9d5e3ffc3 (6.8)
Please see screenshot. With Qt 5.5.1 all works as expected. Example to reproduce:
#include <QApplication> #include <QHBoxLayout> #include <QMenu> #include <QGraphicsScene> #include <QGraphicsView> #include <QToolButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QToolButton* btn = new QToolButton; QMenu* m = new QMenu; m->addAction( "test" ); btn->setMenu( m ); btn->setPopupMode( QToolButton::InstantPopup ); QWidget* const w = new QWidget; QHBoxLayout* const l = new QHBoxLayout; l->addWidget( btn ); w->setLayout( l ); QGraphicsScene scene; scene.addWidget( w ); QGraphicsView graphicsView; graphicsView.setScene(&scene); graphicsView.show(); return app.exec(); }
- duplicates
- 
                    QTBUG-41135 Wrong mapToGlobal position if widget embed in QGraphicsView -         
- Closed
 
-         
- relates to
- 
                    QTBUG-128913 QGraphicsItem::ItemIgnoresTransformations leads to show popup at far off position -         
- Closed
 
-         
- resulted from
- 
                    QTBUG-50136 QWidget::mapTo/FromGlobal not symmetrical for widget embedded into QGraphicsView embedded with transform -         
- Closed
 
-         
| For Gerrit Dashboard: QTBUG-52507 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 144753,9 | QWidget::mapTo/FromGlobal(): Rewrite using a QTransform. | 5.6 | qt/qtbase | Status: MERGED | -2 | 0 | 
| 600945,3 | QWidget::mapTo/FromGlobal(): Fix transformation for QGraphicsView with offsets | dev | qt/qtbase | Status: ABANDONED | 0 | 0 | 
| 600993,1 | QWidget::mapTo/FromGlobal(): Fix transformation for QGraphicsView with offsets | 6.8 | qt/qtbase | Status: ABANDONED | 0 | 0 | 
| 601104,4 | QWidget::mapTo/FromGlobal(): Fix transformation for QGraphicsView with offsets | dev | qt/qtbase | Status: MERGED | +2 | 0 | 
| 601558,2 | QWidget::mapTo/FromGlobal(): Fix transformation for QGraphicsView with offsets | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |