c++ - Pop up dialog to save file in seperate thread -


i have function gets called in separate thread main 1 when button gets clicked , calls qfiledialog::getsavefilename() function file handle file user saved,but can't on separate thread because modifies gui , you're not allowed that.

how can around this?

qfiledialog::getsavefilename() returns file name, not try open file nor return file handle.

it's not clear question, assume button starts thread execute lengthy task , store results file. call qfiledialog::getsavefilename() right there in button click slot, obtain file name , provide name thread. thread read file name, there no need synchronization. , then, open file provided file name in non-gui thread.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -