I have a class derived from QFrame inside which I have an object of a class derived from QWidget.
Qt Code:
______________________________________________________ | { | Context Menu on RightClick defined here; | myWidgetClass->setParent(this); | } | ______________________________________ | | { | | | { | | | e->ignore(); | | | } | | | } | | |______________________________________| |___________________________________________________To copy to clipboard, switch view to plain text mode
I have defined a context-menu to appear when I right-click on myFrameClass. And I have explicitly overridden the mousePressEvent inside myWidgetClass. In spite of this, when I right-click on myWidgetClass, the context-menu of myFrameClass pops up . I dont understand, why, if I have overridden to ignore the mousePressEvent, should the mousePressEvent go to the parent (myFrameClass)?
Any pointers would be appreciated!
Tnx in adv!
Bookmarks