I am sub classing QGraphicsView & QGraphicsItem.
I do have a contextMenuEvent in both of them. How ever while right clicking on
item creates the menu of view. It's not creating the menu defined in item.
If I disable the menu of view, item's menu is working fine.
How do I ignore this clashing?
Here is code of Item's contextMenuEvent
def contextMenuEvent(self, event):
menu = QtGui.QMenu()
menu.addAction("Copy")
menu.addAction("Paste")
menu.exec_(event.screenPos())
Code of view's contextMenuEvent
def contextMenuEvent(self, event):
menu = .....
.....
menu.exec_(event.globalPos())
Prashant
qt-sdk-win-opensource-2009.03.1.exe
Python 2.6.3
PyQt-Py2.6-gpl-4.6-1
Win XP, 32 Bit
Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt