[Interest] question for a blocking background thread call

Scott Bloom scott at towel42.com
Wed Oct 21 02:37:24 CEST 2020

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.

-----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

More information about the Interest mailing list