I'm using QtDesign to create my own UI and convert it to python version. So after subclass the UI python file, i had written some function to implement mouseEvent for QGraphicsView. Just one small question. How can i call the super() function for the QGraphicsView?
class RigModuleUi(QtGui.QMainWindow,Ui_RiggingModuleUI):
def __init__(self,parent = None):
super(RigModuleUi,self).__init__(parent = parent)
self.GraphicsView.mousePressEvent = self.qView_mousePressEvent
def qView_mousePressEvent(self,event):
if event.button() == QtCore.Qt.LeftButton:
super(RigModuleUi,self).mousePressEvent(event)
Look like the super(RigModuleUi,self).mousePressEvent(event)
will return the mouseEvent for QMainWindow, not QGraphicsView. So all other option for mouse like rubberBand will lost.
Thanks