QProgressDialog显示在窗口后面
时间: 2023-12-05 16:03:44 浏览: 88
QProgressDialog显示在窗口后面的问题可以通过设置窗口的模态属性来解决。引用[2]中提到,如果将进度条的属性设置为模态框属性,则只能放大和缩小,无法移动,只能重启。这意味着进度条是以模态的方式显示在窗口上方的。如果希望QProgressDialog显示在窗口后面,则可以将其模态属性设置为非模态,即可以移动、隐藏和显示窗口。例如,可以使用以下代码:
progressDialog.setModal(false);
progressDialog.show();
这样,QProgressDialog将以非模态的方式显示在窗口后面,允许用户在窗口上进行其他操作。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Qt进度条加载资源demo](https://download.csdn.net/download/weixin_48268336/13193505)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [QProgressDialog.close()失败,进度条关闭感觉失败了,无法彻底关闭](https://blog.csdn.net/qq_44667165/article/details/127867209)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文