Den ons 21 okt. 2020 02:39Scott Bloom <sc...@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-boun...@qt-project.org> On Behalf Of Thiago
> Macieira
> Sent: Tuesday, October 20, 2020 3:44 PM
> To: interest@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@qt-project.org
> https://lists.qt-project.org/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to