当前位置:网站首页>The difference between QT exec and show
The difference between QT exec and show
2022-07-25 18:56:00 【hebao0】
To clarify the difference between the two functions , You also need to understand window mode :
modal window : The window will block in place , Only this window can be operated , Other windows can no longer be operated ; Only after closing the window , The return value will be obtained at the code , Block to stop , You can operate other interfaces ;
Half mode window : The window will be blocked in place , Although you can only operate this window , Other windows can no longer be operated , But the code will continue to run , So it's pseudo blocking ;
Non modal window : Windows will not block , It can be operated at will ;
3、 ... and 、exec() and show() The difference between
function effect
QDialog* Dlg = new QDialog(this); Dlg->exec(); modal window
QDialog* Dlg = new QDialog(this); Dlg->setModal(true); Dlg->show(); Half mode window
QDialog* Dlg = new QDialog(this); Dlg->show(); Non modal window
void MainWindow::on_tBtn_Alarm_clicked()
{
AlarmConfigDlg *alarmConfigDlg =new AlarmConfigDlg(this);
alarmConfigDlg->show();
}
void MainWindow::on_tBtn_Alarm_clicked()
{
AlarmConfigDlg alarmConfigDlg(this);
alarmConfigDlg.exec();
}
边栏推荐
- 接口自动化测试平台FasterRunner系列(三)- 操作示例
- Ping command details [easy to understand]
- 给生活加点惊喜,做创意生活的原型设计师丨编程挑战赛 x 选手分享
- 接口自动化测试平台FasterRunner系列(一)- 简介、安装部署、启动服务、访问地址、配置补充
- 有孚网络受邀参加2022全国CIO大会并荣获“CIO信赖品牌”称号
- How to create an effective help document?
- SQL 实现 Excel 的10个常用功能,附面试原题
- Common file operations
- 优秀的测试/开发程序员突破,不忘初心,方得始终......
- Go代码检查工具
猜你喜欢

阿里云技术专家郝晨栋:云上可观测能力——问题的发现与定位实践

Project: serial port receiving RAM storage TFT display (complete design)

Ultimate doll 2.0 | cloud native delivery package

从目标检测到图像分割简要发展史
![[open source project] stm32c8t6 + ADC signal acquisition + OLED waveform display](/img/5f/413f1324a8346d7bc4a9490702eef4.png)
[open source project] stm32c8t6 + ADC signal acquisition + OLED waveform display

微软Azure和易观分析联合发布《企业级云原生平台驱动数字化转型》报告

MySQL sub query (selected 20 sub query exercises)

There are several browser cores. How to upgrade if the browser version is too low

How high are the young people in this class for "ugly things"?

阿里云技术专家秦隆:可靠性保障必备——云上如何进行混沌工程?
随机推荐
hough变换理解[通俗易懂]
Huawei switch system software upgrade and security vulnerability repair tutorial
21 days proficient in typescript-4 - type inference and semantic check
淦,为什么 ““ .length !== 3 ??
APP测试点(思维导图)
Weak network test tool -qnet
有孚原力超算,为客户提供定制化高性能计算服务
The bank's wealth management subsidiary accumulates power to distribute a shares; The rectification of cash management financial products was accelerated
Deng Qinglin, a technical expert of Alibaba cloud: Best Practices for disaster recovery and remote multi activity across availability zones on cloud
请问什么是国债逆回购?安全吗?
华为年内二度招聘“天才少年”;540万Twitter账号信息泄露,卖价3万美元;谷歌解雇了相信AI有意识的工程师|极客头条
How high are the young people in this class for "ugly things"?
Address book (I)
弱网测试工具-QNET
Software testing (mind mapping)
ThreadLocal夺命11连问
The understanding of domain adaptation in transfer learning and the introduction of three technologies
果链“围城”:傍上苹果,是一场甜蜜与苦楚交错的旅途
"Wdsr-3" Penglai pharmaceutical Bureau solution
Interface automation test platform fasterrunner series (III) - operation examples