[Interest] question for a blocking background thread call
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Tue Oct 20 23:26:10 CEST 2020
On 20/10/2020 22:16, Scott Bloom wrote:
>
> Essentially, on a “button click” a long running blocking function call
> is executed. I can safely call the function into a background thread,
> but I don’t want the gui flow to continue.
>
> My idea is the following, a class that takes a lambda.
>
> When a blocking function is called on the class, the lambda is executed
> in a background thread. While the function waits calling processEvents
> without user events being handled (this part is easy…)
>
> Does anyone have an example to follow for this. Unfortunately, Im
> hitting all sorts of weirdness when getting this.
>
Can't you just create a QDialog and exec() it?
Thanks,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20201020/6f4a0edf/attachment.bin>
More information about the Interest
mailing list