Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-1625

QMenu exec_ is not working

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.1.2
    • PySide
    • None
    • Linux/X11
    • 401a5b8a3d4468f97ec20a86055ad785262ceb43 (pyside/pyside-setup/dev) 024dd90393b73df3a52d217378ca2dc7c3328dc0 (pyside/pyside-setup/6.1)

    Description

      Even though it is deprecated, the exec_ method of QMenu is not working as expected. Executing the attached script and clicking once on the action displayed in the menu gives this output

      (venv6) ~/workspace$ python menubug.py 
      ~/workspace/menubug.py:15: DeprecationWarning: 'exec_' will be removed in the future. Use 'exec' instead.
       a = m.exec_(point)
      ~/workspace/menubug.py:15: RuntimeWarning: CopyCppToPython(): SbkConverter::copyToPython is null for "PySide6.QtGui.QAction".
       a = m.exec_(point)
      None

      Note that the result of the function is None instead of the expected action object. Changing exec_ to exec is working as expected.

      Attachments

        1. menubug.py
          0.6 kB
        2. pyside1625.py
          0.9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            bdev a dev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes