defining and calling QML functions directly from Python
Stefan Seefeld
stefan at seefeld.name
Fri Sep 24 19:24:51 BST 2021
Thanks Maxime,
Yes, thanks for sharing your QMLWrapper class.
Meanwhile, I have applied the attached patch to solve my current
problem. With that, I'm able to call QML functions even from non-primary
threads.
Phil, do you think this is a sensible fix ? Feel free to incorporate
this into PyQt !
Best,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210924/e0813009/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .signature.png
Type: image/png
Size: 2754 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210924/e0813009/attachment.png>
-------------- next part --------------
--- qpy/QtCore/qpycore_pyqtmethodproxy.cpp 2020-05-31 12:10:54.673013000 +0000
+++ qpy/QtCore/qpycore_pyqtmethodproxy.cpp,new 2021-09-24 18:20:13.624236387 +0000
@@ -207,8 +207,8 @@
if (!failed)
{
- failed = !method.invoke(mp->qobject, ret, a0, a1, a2, a3, a4, a5, a6,
- a7, a8, a9);
+ failed = !method.invoke(mp->qobject, Qt::DirectConnection,
+ ret, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);
if (failed)
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stefan.vcf
Type: text/x-vcard
Size: 4 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210924/e0813009/attachment.vcf>
More information about the PyQt
mailing list