Hi everybody
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.
I try this too, but no go at all.
super(QtGui.QGraphicsView,self.GraphicsView).mouseMoveEvent(event)
Thanks
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.