Qt modal dialog and main process

送分小仙女□ 提交于 2019-12-01 16:32:07

Actually, this sounds kinda easy (unless I misunderstand your question).

QDialog my_progress_dialog( this );
my_progress_dialog.setModal( true );
my_progress_dialog.show();

Calling show() not exec() will leave you in the main eventloop. At the same time, setting the dialog modal blocks all user input to the main window. Job done.

Have you looked at QProgressDialog? It's there for exactly this purpose.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!