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

QMenu location is wrong

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.0
    • GUI: Menus
    • None
    • wyland
    • 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

        For Gerrit Dashboard: QTBUG-85305
        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes