当前位置:网站首页>Qt学习01 GUI程序原理分析
Qt学习01 GUI程序原理分析
2022-06-29 10:30:00 【一个小黑酱】
Qt学习01 GUI程序原理分析
命令行应用程序
命令行应用程序的特点(Command Line Interface)
- 是一种基于顺序执行结构的可执行程序
- 程序执行过程中不需要与用户产生交互
- 程序执行后给出最终的运行结果
例子:gcc编译源代码
gcc a.c b.c c.c
编译过程中不产生用户交互,编译结束后或者成成可执行程序或者给出错误信息。
命令行应用程序的运行模式

特点:程序的运行有固定的开始和固定的结束
命令行应用程序适用于
- 单任务场合
- 无交互或简单交互场合
- 服务器应用场合
命令行应用程序是早期计算机系统中的主要程序类型
图形界面应用程序
图形界面应用程序的特点(Graphic User Interface)
- 是一种基于消息驱动模型的可执行程序
- 程序的执行依赖于用户的交互过程
- 程序执行过程中实时响应用户操作
- 一般情况下程序执行后不会主动退出
图形界面应用程序的运行模式

图形界面应用程序的消息处理模型

原理:用户使用鼠标或键盘对计算机操作,操作系统生成相应的系统消息,发送到一个有焦点的应用程序,应用程序收到系统消息,调用消息处理函数相应处理用户操作。
过程:用户产生用户操作 => 操作系统接收产生系统消息 => 应用程序接收调用消息处理函数
图形界面应用程序的编程多数时候就是编写消息处理函数去处理系统消息
图形界面应用程序适用于
- 多任务的场合
- 强用户交互的场合
- 非专业计算机用户
图形界面应用程序是当代计算机系统中的主要程序类型
图形界面程序 VS 命令行程序
- 当代大型软件产品架构模型

小结
| 命令行应用程序 | 图形界面应用程序 |
|---|---|
| 基于顺序执行结构 | 基于消息驱动模型 |
| 弱交互执行 | 强交互执行 |
| 由用户出触发运行 | 由用户触发运行 |
| 主动结束 | 由用户触发结束 |
边栏推荐
- 【HBZ分享】Mysql的InnoDB原理
- misc3~7
- 重建中国科研自信——2022最新自然指数排行榜(Nature Index 2022 )公布,中国的研究产出增幅最大...
- LeetCode 535 TinyURL的加密与解密[map] HERODING的LeetCode之路
- Specific method and example program of Siemens s7-200smart control stepping motor
- MATLAB basic Max to find the maximum value of one-dimensional or two-dimensional array +sleep (pause)
- [3 questions per day (2)] minimum operand for generating alternate binary strings
- Thoroughly understand JVM Series 7: what is the flow process of objects in the generational model?
- crypto 1~5
- Take another picture of cloud redis' improvement path
猜你喜欢

软件工程导论——第五章——总体设计

Pipeline aggregations pipeline aggregations - parent-2

关于IP定位查询接口的测评Ⅱ

又拍云 Redis 的改进之路

Google Earth engine (GEE) - Gedi L2a vector canopy top height (version 2) global ecosystem data set

巴比特 | 元宇宙每日必读:HTC 宣布推出首款元宇宙手机,售价约2700元人民币,都有哪些新玩法?...

Easydss is deployed on Disk C, and the video playback cannot be played normally. How to solve this problem?

高效远程办公的基石:有效沟通 |社区征文

ModbusTCP协议网络学习型单路红外模块(双层板)

Online sql to htmltable tool
随机推荐
[various * * question series] what are OLTP and OLAP?
Babbitt | yuancosmos daily must read: HTC announced the launch of the first yuancosmos mobile phone, which costs about 2700 yuan. What are the new ways to play
专访 SUSS NiFT 负责人:Web3 的未来离不开“人人为我,我为人人”的治理
LVGL库入门教程 - 动画
影响LED封装散热主要因素有哪些?
(JS) filter out keys with value greater than 2 in the object
斐波那锲数列与冒泡排序法在C语言中的用法
Qt学习06 窗口部件及窗口类型
The Chinese Computational Linguistics Conference and the national knowledge atlas and Semantic Computing Conference are in full swing
[3 questions per day (2)] minimum operand for generating alternate binary strings
云原生开发必备:首个通用无代码开发平台 iVX 编辑器
What is the experience of working in an IT company in Japan?
涂鸦云开发 demo 登录
9 款好用到爆的 JSON 处理工具,极大提高效率!
【每日3题(2)】生成交替二进制字符串的最少操作数
工具箱之 IKVM.NET 项目新进展
Micro blog comment architecture design
Data analysis method and Thinking: funnel analysis
中国计算语言学大会、全国知识图谱与语义计算大会赛题火热进行中
Interview questions of Tencent automation software test of CSDN salary increase secret script (including answers)