Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85305

QMenu location is wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.0
    • Fix Version/s: None
    • Component/s: GUI: Menus
    • Labels:
      None
    • Environment:
      wyland
    • Platform/s:
      Linux/Wayland

      Description

          When window A is covered by window B, right-click on window A, the position of QMenu is displayed incorrectly, as shown in the video

       

       

      //代码占位符
      #include <QMenu>
      
      Widget::Widget(QWidget *parent)
          : QWidget(parent)
      {
      
      }
      
      Widget::~Widget()
      {
      
      }
      void Widget::contextMenuEvent(QContextMenuEvent *event)
      {
          QMenu *pmenu = new QMenu();
          pmenu->addAction("menu action 1");
          pmenu->addAction("menu action 2");
          pmenu->addAction("menu action 3");
          pmenu->exec(QCursor::pos());
      }
      
      

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            tanghaixiang haixiang tang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes