[PyQt] Advices on embedding python in Qt/C++ application

Alexis Barbot alexis.barbot at gmail.com
Mon Aug 26 08:12:37 BST 2019


 Dear PyQt community,
(sorry if this email is published twice, I initially sent it before
suscribing)

I'm asking for help to make a project of integrating python code in a
Qt/C++ application. The application is developed using Qt5.9 and mingw/gcc
on windows10 (using c++14 standards).
I already read the Python page for calling python from c++ (
https://docs.python.org/3/extending/embedding.html), and I can successfully
invoke python code from a c++ method. Now my main concern is to pass
existing object from c++ to the python part, ideally a QVariantMap that may
contain also custom types of mine. So I considered using PyQt for this,
assuming I could convert my own types using SIP. However after some trials,
I figured out I would have to download PyQt sources and compile it if I
wanted to have some c++ api to pass objects to Python. As I failed to do
this with mingw and my current Python installation, and before going beyond
with error messages, I'd like to ask: Is this something already done? Am I
trying to do it the right way? Are there some issues in my setup?
Thanks for your help
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190826/85392b49/attachment.html>


More information about the PyQt mailing list