<div dir="auto">Hi Stefan,<div dir="auto"><br></div><div dir="auto">A while back i coded this QMLWrapper class that should allow you to do what you want</div><div dir="auto"><br></div><div dir="auto"><a href="https://github.com/leddartech/pioneer.common.gui/blob/master/pioneer/common/gui/utils.py">https://github.com/leddartech/pioneer.common.gui/blob/master/pioneer/common/gui/utils.py</a><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu., Sep. 23, 2021, 2:33 p.m. Stefan Seefeld, <<a href="mailto:stefan@seefeld.name">stefan@seefeld.name</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>...and yet another follow-up:</p>
<p>as I mentioned, I'm interacting with the main application from an
attached Python interpreter, which - of course - runs in its own
thread, to let the main thread take care of the Qt event loop.</p>
<p>Looking at the PyQt5 code, I noticed that the implementation of
the method call (in the `pyqtMethodProxy_call()` function in
`qpycore_pyqtmethodproxy.cpp`) calls `method.invoke()` without
specifying a connection-type. This means the the `auto`
connection-type will be chosen, which results in the `queued`
connection-type to be chosen, given that I'm calling this from a
secondary thread. And of course, that will fail...</p>
<p>Thus my question: what is the reason for the above to not
explicitly specify the `direct` connection-type argument in the
`invoke()` call, given that the `MethodProxy` Python type will
always use this as direct call, and thus will fail when used from
non-primary threads ?</p>
<br>
<div>
<div>
<div>
<pre><img src="cid:part1.BEB60C42.E777624A@seefeld.name" alt="Stefan" width="123" height="77">
--
...ich hab' noch einen Koffer in Berlin...
</pre>
</div>
</div>
</div>
</div>
</blockquote></div>