[Interest] question for a blocking background thread call

2020-10-20 Thread Scott Bloom
Im working with a thirdparty lib, that I have zero control over šŸ˜Š 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

Re: [Interest] question for a blocking background thread call

2020-10-20 Thread Giuseppe D'Angelo via Interest
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 block

Re: [Interest] question for a blocking background thread call

2020-10-20 Thread Thiago Macieira
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. --

Re: [Interest] question for a blocking background thread call

2020-10-20 Thread Scott Bloom
::exec. Works like charm. Thanks for the advice. Scott -Original Message- From: Interest 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

Re: [Interest] question for a blocking background thread call

2020-10-20 Thread Elvis Stansvik
> -Original Message- > From: Interest 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

Re: [Interest] question for a blocking background thread call

2020-10-21 Thread coroberti
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 >> wrot

Re: [Interest] question for a blocking background thread call

2020-10-21 Thread Elvis Stansvik
long > > running operations in our application, and it has also worked out fine. > > > > Elvis > > > >> > >> Scott > >> -Original Message- > >> From: Interest On Behalf Of Thiago > >> Macieira > >> Sent

Re: [Interest] question for a blocking background thread call

2020-10-21 Thread coroberti
> >> 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. > > > >