[PyQt] Using PyQt inside of C++ Qt Application

Phil Thompson phil at riverbankcomputing.com
Wed Aug 14 17:27:42 BST 2019


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


More information about the PyQt mailing list