[Interest] question for a blocking background thread call

Elvis Stansvik elvstone at gmail.com
Wed Oct 21 08:50:12 CEST 2020


Den ons 21 okt. 2020 02:39Scott Bloom <scott at towel42.com> skrev:

> Well. I 100% totally overthought this... and was able to implement this in
> about 10 lines of code using a derivation of QProgressDIalog + QtConcurrent
>
> The progress dialog, is run with windowModality set to  Qt::WindowModal,
>
> I overload exec, and launch the function then call QProgressDialog::exec.
>
> Works like charm. Thanks for the advice.
>

Just to chime in: This is also the approach we've taken to some long
running operations in our application, and it has also worked out fine.

Elvis


> Scott
> -----Original Message-----
> From: Interest <interest-bounces at qt-project.org> On Behalf Of Thiago
> Macieira
> Sent: Tuesday, October 20, 2020 3:44 PM
> To: interest at qt-project.org
> Subject: Re: [Interest] question for a blocking background thread call
>
> On Tuesday, 20 October 2020 14:26:10 PDT Giuseppe D'Angelo via Interest
> wrote:
> > Can't you just create a QDialog and exec() it?
>
> Or any other modal window in front. You probably want to display either a
> progress bar or a distraction, to let your users know that the application
> isn't frozen.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel DPG Cloud Engineering
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20201021/4b6a1282/attachment.html>


More information about the Interest mailing list