Slots are not accessible via super()
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Although slots of Qt objects can be called as methods in derived classes when invoked directly, they cannot be called by using
super()
, as demonstrated below. What is required to implement this??Thanks.
I never used super in Python, did you try
QtCore.QObject.objectName()
By the way, I am wondering that it is available as a slot, since properties have precedence in PythonQt and objectName is a property?
My question is about referencing slots using
super()
and not about callingobjectName()
-- this is just an example -- as I'm trying to run existing code that makes extensive use of super.Another example:
Oops, bad example... I meant:
You misunderstood me, I mean if you can call a method on the super class like this:
QtCore.QObject().setObjectName(self, "name")
Hm, I don't know what super does/expects from the PythonQt wrappers to make this work.
Sure, that works, but the point of using super() is to have Python search back through the MRO without have to explicitely refer to base classes. From reading the Descriptor HowTo Guide relevant code is in
Objects/typeobject.c
but I'm not sure of what would need doing in PythonQt's code.