[PyQt] Python Threads do not work when QWidget is extracted from sip.unwrapinstance

Deepak Hosamane Deepak.Hosamane at lntebg.com
Mon Jan 18 11:40:22 GMT 2016


Hi,

I am trying to create an application which can simply embed PyQt5 scripts as QWidgets into my C++ Qt-GUI( in Windows ) application.
I was successful in embedding the scripts in my application but the threads written inside the Python scripts simply won't work.
After having read a few articles on GIL interpreter locks, it looked to me like they are not applicable in my case as these python threads are not to be called explicitly by the C++ application.

Could someone kindly guide me on what could be done to enable these Python threads in my C++ Application.
Any help would be greatly appreciated.

Sample code has been attached for reference.( To run the executable just place the Screen.py file where the Executable is generated ... )

Thanks  and Warm Regards,
Deepak.H

[http://www.lntebg.com/images/Digital_Signature_Elecrama_2016.jpg]

Larsen & Toubro Limited

www.larsentoubro.com

This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160118/ff719388/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160118/ff719388/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen.py
Type: application/octet-stream
Size: 645 bytes
Desc: Screen.py
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160118/ff719388/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestApp.pro
Type: application/octet-stream
Size: 199 bytes
Desc: TestApp.pro
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160118/ff719388/attachment-0001.obj>


More information about the PyQt mailing list