exposing c++ functions to python
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Greetings,
I'd like to expose some C++ functions to the python interpreter (which are not member finctions
of any class). How can I achieve this with PythonQT ?
Thank you in advance.
This is not directly supported. You need to generate a QObject with slots that call your C++ functions and add an instance of the object to your python module with a given name, e.g."Api" and then you can call the functions on the Api object.
Thank you very much for the answer