I'm getting this error with my eventFilter using PySide in Maya 2014.
Code:
# RuntimeWarning: Invalid return value in function QMainWindow.eventFilter,
expected bool, got NoneType., at line 3, in "C:\Program
Files\Autodesk\Maya2014\bin\maya.exe"
# RuntimeWarning: Invalid return value in function QMainWindow.eventFilter,
expected bool, got NoneType., at line 1, in "sys"
It doesn't show up every time... only sometimes. The line number also
doesn't relate the line of codes I have.
Am I doing something wrong? I'm subclassing QMainwindow and also a ui I
converted using pysideuic. Here is my part of the code.
Code:
class MyClass(QtGui.QMainWindow, my_converted_ui):
def __init__(self, *args, **kwargs):
super(MyClass, self).__init__(*args, **kwargs)
self.setupUi(self)
self.installEventFilter(self)
def eventFilter(self, object, event):
if event.type() == QtCore.QEvent.WindowActivate:
print "widget window has gained focus"
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/f86b9c33-c6bb-4d5a-8c93-107c81ea1833%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.