<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>Hello Phil,</p>
<p>allow me to come back to this:<br>
</p>
<div class="moz-cite-prefix">On 2021-07-21 9:20 a.m., Stefan Seefeld
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:b17157c4-f14f-38f6-cd57-539ecdfd8f39@seefeld.name">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<p><br>
</p>
<div class="moz-cite-prefix">On 2021-07-21 2:57 a.m., Phil
Thompson wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1fc516d9826909aa31b57e2d576f9ced@riverbankcomputing.com">On
20/07/2021 21:44, Stefan Seefeld wrote: <br>
<blockquote type="cite">Hello, <br>
<br>
I'm working on Python bindings for a set of C++ libraries / <br>
applications, some of which are using Qt. <br>
The application code is instantiating many Qt objects, some of
which I <br>
now want to expose to Python. For in-house C++ APIs this is
easy, as I <br>
merely need to reflect the C++ types to Python using
Boost.Python, so <br>
I can have functions such as <br>
<br>
``` <br>
class A; <br>
std::shared_ptr<A> create_a(); <br>
``` <br>
exposed to Python such that both, the type `A` as well as the
function <br>
`create_a()` are known in Python. <br>
<br>
Now assume `A` is actually a type with an existing Python
wrapper in <br>
PyQt5. How can I instantiate `A` in C++ and then pass it to
the Python <br>
runtime such that the PyQt5 bindings are used ? (To make this
<br>
concrete, I want to make the `QQMLApplicationEngine` instance
of my <br>
C++ app accessible in Python, so that I can use Python to
script and - <br>
more importantly - introspect and test my application's GUI. <br>
<br>
Any pointers ? <br>
</blockquote>
<br>
Start with this... <br>
<br>
<a class="moz-txt-link-freetext"
href="https://www.riverbankcomputing.com/static/Docs/sip/abi_12.html#abi-v12-for-handwritten-code"
moz-do-not-send="true">https://www.riverbankcomputing.com/static/Docs/sip/abi_12.html#abi-v12-for-handwritten-code</a>
<br>
</blockquote>
<p>It looks like the functions I'm looking for are `<code
class="sig-name descname">sipConvertFromNewType</code><span
class="sig-paren">` and `</span><span class="sig-paren"><code
class="sig-name descname">sipConvertFromType</code><span
class="sig-paren">`, correct ?</span></span></p>
</blockquote>
<p><br>
</p>
<p>What header file(s) do I need to include in my own C++ code to
make the `sipConvertFromNewType` function visible ? The generic
"sip.h" header doesn't seem to provide it. grepping through the
code I only see the symbol defined as a macro in generated
headers, but those don't seem to be installed anywhere.</p>
<p>Thanks !</p>
<div class="moz-signature">
<div class="moz-signature">
<div class="moz-signature">
<pre><img moz-do-not-send="false" src="cid:part2.51F83B2F.3B36ADAA@seefeld.name" alt="Stefan" width="123" height="77">
--
...ich hab' noch einen Koffer in Berlin...
</pre>
</div>
</div>
</div>
</body>
</html>