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

Unhandled win32 exception QMenu exec_ (synchronous)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 1.1.2
    • PySide
    • None
    • Windows XP SP3
      Python 3.3
      PySide 1.1.2

    Description

      When I try to execute a QMenu synchronous an "unhandled win32 exception" is raised. This not occurs when execute it with "popup()" instruction. I attach the error detail:

      An unhandled win32 exception occurred in pythonw.exe [5720]
      Unhandled exception at 0x65357388 in pythonw.exe: 0xC0000005: Access violation reading location 0x00000004.

      This is the last call stack:
      QtGui4.dll!65357388()
      [Frames below may be incorrect and/or missing, no symbols loaded for QtGui4.dll]
      python33.dll!1e0f819e()

      This is the subclass code i try to execute:

      class clsEdit(QtGui.QLineEdit):
      def _init_(self, *args):
      QtGui.QLineEdit._init_(self, *args)
      self.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
      self.customContextMenuRequested.connect(self.ShowMenu)

      def ShowMenu(self, pos):
      menu = QtGui.QMenu(self)
      menu.setTitle("Options")
      menu.addAction(QtGui.QAction("Copy", menu))
      menu.addAction(QtGui.QAction("Paste", menu))
      ret = menu.exec_(self.mapToGlobal(pos))

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            guruman guruman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes