Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsView + AnchorUnderMouse + setContextMenu (zoom issue)
Qt 6.11 is out! See what's new in the release blog

QGraphicsView + AnchorUnderMouse + setContextMenu (zoom issue)

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 868 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Drus
    wrote on last edited by
    #1

    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));
    setContextMenuPolicy(Qt::ActionsContextMenu);
    

    }@

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

    Qt-4.8.5
    Kubuntu 12.04_64

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved