<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,<br>
</p>
<div class="moz-signature">I'm working on Python bindings for a set
of C++ libraries / applications, some of which are using Qt.</div>
<div class="moz-signature">The application code is instantiating
many Qt objects, some of which I now want to expose to Python. For
in-house C++ APIs this is easy, as I merely need to reflect the
C++ types to Python using Boost.Python, so I can have functions
such as</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">```<br>
</div>
<div class="moz-signature">class A;</div>
<div class="moz-signature">std::shared_ptr<A> create_a();</div>
<div class="moz-signature">```</div>
<div class="moz-signature">exposed to Python such that both, the
type `A` as well as the function `create_a()` are known in Python.</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Now assume `A` is actually a type with an
existing Python wrapper in PyQt5. How can I instantiate `A` in C++
and then pass it to the Python runtime such that the PyQt5
bindings are used ? (To make this concrete, I want to make the
`QQMLApplicationEngine` instance of my C++ app accessible in
Python, so that I can use Python to script and - more importantly
- introspect and test my application's GUI.</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Any pointers ?</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Many thanks,<br>
</div>
<div class="moz-signature"><br>
<div class="moz-signature">
<div class="moz-signature">
<pre><img moz-do-not-send="false" src="cid:part1.EF610BAE.1CF8D38F@seefeld.name" alt="Stefan" width="123" height="77">
--
...ich hab' noch einen Koffer in Berlin...
</pre>
</div>
</div>
</div>
</body>
</html>