Menu

exposing c++ functions to python

Help
2016-11-28
2016-11-29
  • Csaba Torda

    Csaba Torda - 2016-11-28

    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.

     
  • Florian Link

    Florian Link - 2016-11-28

    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.

     
  • Csaba Torda

    Csaba Torda - 2016-11-29

    Thank you very much for the answer

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.