Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
1.1.2
-
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))