drumboy354
15th November 2011, 17:25
Hello!
I'm having a bit of trouble with overloading a function for a QGraphicsView of mine. The QGraphicsView was created in Qt Designer and is called nodeDropWindow. In this example I'm trying to overload the wheelEvent but I just want to get anything working. This is in my mainForm() class where setupUI is called. From my understanding all I would have to implement is:
@pyqtSignature("QEvent")
def on_nodeDropWindow_wheelEvent(self, event):
print("Hi!")
So what I"m trying to do is just get my console to print "Hi!" whenever I use my mouse wheel over the graphics window. This seems so simple to me but I can't get it working :-( Anybody have any ideas? Thanks!
I'm having a bit of trouble with overloading a function for a QGraphicsView of mine. The QGraphicsView was created in Qt Designer and is called nodeDropWindow. In this example I'm trying to overload the wheelEvent but I just want to get anything working. This is in my mainForm() class where setupUI is called. From my understanding all I would have to implement is:
@pyqtSignature("QEvent")
def on_nodeDropWindow_wheelEvent(self, event):
print("Hi!")
So what I"m trying to do is just get my console to print "Hi!" whenever I use my mouse wheel over the graphics window. This seems so simple to me but I can't get it working :-( Anybody have any ideas? Thanks!