Ejemplo n.º 1
0
 def testChildEventMonkeyPatch(self):
     #Test if the new childEvent injected on QObject instance is called from C++
     parent = QObject()
     def childEvent(obj, event):
         self.duck_childEvent_called = True
     parent.childEvent = MethodType(childEvent, parent, QObject)
     child = QObject()
     child.setParent(parent)
     self.assertTrue(self.duck_childEvent_called)
     # This is done to decrease the refcount of the vm object
     # allowing the object wrapper to be deleted before the
     # BindingManager. This is useful when compiling Shiboken
     # for debug, since the BindingManager destructor has an
     # assert that checks if the wrapper mapper is empty.
     parent.childEvent = None
Ejemplo n.º 2
0
 def testChildEventMonkeyPatch(self):
     #Test if the new childEvent injected on QObject instance is called from C++
     parent = QObject()
     def childEvent(obj, event):
         self.duck_childEvent_called = True
     parent.childEvent = MethodType(childEvent, parent, QObject)
     child = QObject()
     child.setParent(parent)
     self.assert_(self.duck_childEvent_called)
     # This is done to decrease the refcount of the vm object
     # allowing the object wrapper to be deleted before the
     # BindingManager. This is useful when compiling Shiboken
     # for debug, since the BindingManager destructor has an
     # assert that checks if the wrapper mapper is empty.
     parent.childEvent = None
Ejemplo n.º 3
0
 def childEvent(self, event):
     QObject.childEvent(self, event)
     self.child_event_received = True
Ejemplo n.º 4
0
 def childEvent(self, event):
     QObject.childEvent(self, event)
     self.child_event_received = True
Ejemplo n.º 5
0
 def childEvent(obj, event):
     QObject.childEvent(obj, event)
     self.duck_childEvent_called = True
Ejemplo n.º 6
0
 def childEvent(self, event):
     QObject.childEvent(self, event)
Ejemplo n.º 7
0
 def childEvent(obj, event):
     QObject.childEvent(obj, event)
     self.duck_childEvent_called = True
Ejemplo n.º 8
0
 def childEvent(self, event):
     QObject.childEvent(self, event)