Important: Please read the Qt Code of Conduct -

QGraphicsView + AnchorUnderMouse + setContextMenu (zoom issue)

  • As example - elasticnodes

    code adds a menu
    node6->setPos(50, 0);
    node7->setPos(-50, 50);
    node8->setPos(0, 50);
    node9->setPos(50, 50);

    addAction(new QAction(QObject::tr("Anchor"),this));
    addAction(new QAction(QObject::tr("Under"),this));
    addAction(new QAction(QObject::tr("Mouse"),this));
    addAction(new QAction(QObject::tr("Not"),this));
    addAction(new QAction(QObject::tr("Work"),this));
    addAction(new QAction(QObject::tr("Click"),this));
    addAction(new QAction(QObject::tr("To"),this));
    addAction(new QAction(QObject::tr("Repair"),this));


    If you click outside of the menu - does not work AnchorUnderMouse.
    If you click a menu item - and it works well

    Kubuntu 12.04_64

Log in to reply