[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Python Threads do not work when QWidget is extracted from sip.unwrapinstance
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2016-01-18 12:34:53
Message-ID: 70F5C04D-A593-419A-BC4E-ECF375B4DD96 () riverbankcomputing ! com
[Download RAW message or body]
On 18 Jan 2016, at 11:40 am, Deepak Hosamane <Deepak.Hosamane@lntebg.com> wrote:
>
> 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 ... )
The GIL is always applicable. It can be very difficult to anticipate when Python code \
or C++ will be run especially when you have Python reimplementations of C++ virtuals.
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic