Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Show 2 QMenus simultaneously (one is always unresponsive)



  • I'm working with a node editor (left-to-right style) in a QGraphicsScene, and on right-click of a node I want options dealing with the inputs in a menu on the left of the mouse, and options dealing with outputs in a menu on the right.
    The problem is when I create 2 QMenus and popup() both, only one of the two responds to hovers and clicks. If I click off that one, then the second one starts responding.
    How the heck can I get both of them to respond?

    If it matters, I'm doing this in an embedded python and PySide2. And I'm creating the menus using my own event filter into the main program's QGraphicsScene that I can't change.



  • @tfox said in Show 2 QMenus simultaneously (one is always unresponsive):

    The problem is when I create 2 QMenus and popup() both, only one of the two responds to hovers and clicks. If I click off that one, then the second one starts responding.
    How the heck can I get both of them to respond?

    I don't think this is possible (at least not out-of-the-box) nor intuitive and does not make sense at all.
    Popups are not supposed to act like windows and stay open and active while doing other stuff.

    See here:
    https://www.qtcentre.org/threads/49795-Implement-two-menus-at-the-same-time!


Log in to reply