Using PyQt inside of C++ Qt Application

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Using PyQt inside of C++ Qt Application

Daniel Trstenjak-2
Hi,

I'm currently evaluating how a mid sized PyQt application can be
integrated into a C++ Qt application.

The C++ application already has a python interpreter integrated
and has a python interface for several parts of its functionality.

The integration should make it possible that the PyQt application
can use this functionality through the python interface.

A client server architecture between the PyQt application and the C++
application most likely isn't sufficient to support the kind of user
interactivity and performant visual feedback that's needed. Also having
to define a network interface for the available python interface would
be a huge amount of work.

If the PyQt application and the C++ application are using the same Qt
library (sharing the same QApplication object and event queue) and the
same python interpreter, is there a way to integrate both?

Thanks for any hints!

Greetings,
Daniel
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Using PyQt inside of C++ Qt Application

Phil Thompson-5
On 14/08/2019 17:13, Daniel Trstenjak wrote:

> Hi,
>
> I'm currently evaluating how a mid sized PyQt application can be
> integrated into a C++ Qt application.
>
> The C++ application already has a python interpreter integrated
> and has a python interface for several parts of its functionality.
>
> The integration should make it possible that the PyQt application
> can use this functionality through the python interface.
>
> A client server architecture between the PyQt application and the C++
> application most likely isn't sufficient to support the kind of user
> interactivity and performant visual feedback that's needed. Also having
> to define a network interface for the available python interface would
> be a huge amount of work.
>
> If the PyQt application and the C++ application are using the same Qt
> library (sharing the same QApplication object and event queue) and the
> same python interpreter, is there a way to integrate both?

Yes, it's no different from any other module your embedded interpreter
is (presumably) already importing.

You might also want to look at...

https://www.riverbankcomputing.com/static/Docs/sip/embedding.html

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Using PyQt inside of C++ Qt Application

Daniel Trstenjak-2
Hi Phil,

Yes, it's no different from any other module your embedded interpreter is (presumably) already importing.

so the QApplication and the event queue would be automatically
shared without any further special handling?

Greetings,
Daniel

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt