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
Post a Comment