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

QWidget::customContextMenuRequested coordinates are off for widgets in a QMenu

    XMLWordPrintable

Details

    • 0462d24dcd (qt/qtbase/dev) 0462d24dcd (qt/tqtc-qtbase/dev) d0b5adb3b2 (qt/qtbase/6.2) a015985490 (qt/qtbase/6.3) d0b5adb3b2 (qt/tqtc-qtbase/6.2) a015985490 (qt/tqtc-qtbase/6.3) 3045196fba (qt/tqtc-qtbase/5.15)

    Description

      When opening a QMenu and right clicking on a widget within the menu to open context menu the context menu position provided by QWidget::customContextMenuRequested doesn't seem to be mapped to the widget coordinates => the position is way off and using it to position a context menu doesn't yield very good results.

      Steps to reproduce the problem:

      1. run the attached example.
      2. Click on "press here" button
      3. Right click anywhere on "tab1" or "tab2" white rectangle. The effect is clearer the further the click is from the upper left corner of the window.

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: