Now, if I call py_q_battery(), I get the right wrapped instance and am able to access all the methods of BatteryInterface correctly. But if I call battery(), I'll get plain C++ object which has no methods available. What I want is to be able to call battery() and get a correct wrapped instance. I tried messing with generated wrappers, but had no luck. Is there a way to do it nicely?
Many thanks.
Last edit: Roman Belkov 2017-05-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have roughly the same code structure:
And I have the following code generated by the PythonQt generator:
Now, if I call py_q_battery(), I get the right wrapped instance and am able to access all the methods of BatteryInterface correctly. But if I call battery(), I'll get plain C++ object which has no methods available. What I want is to be able to call battery() and get a correct wrapped instance. I tried messing with generated wrappers, but had no luck. Is there a way to do it nicely?
Many thanks.
Last edit: Roman Belkov 2017-05-25