当前位置:网站首页>QT Road (2) -- HelloWorld
QT Road (2) -- HelloWorld
2022-06-11 05:06:00 【Skill code brother】
Hello World
#include <QApplication>
#include <QWidget>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget w;
w.show();
return a.exec();
}

- Qt The header file doesn't have .h suffix ;
- Qt A class corresponds to a header file , The class name is the header file name ;
- QApplication Application class :
- Manage control flow and main settings for GUI applications .
- yes Qt The lifeblood of the whole backstage management she includes Main event loop , In which... From window systems and other resources All event handling and scheduling . It also handles Initialization and end of application , also Provide dialog management .
- For any use Qt The GUI application for , There just happens to be one QApplication object , Whether or not the application has 0、1、2 Or more windows .
- a.exec()
The program enters the message loop , Waiting for the corresponding user input . here main() Transfer control to Qt,Qt Complete the event handling work , When the application exits exec() Will return . stay exec() in ,Qt Accept and process user and system events and pass them to the appropriate widgets .
边栏推荐
- Comparison of gigabit network card chips: who is better, a rising star or a Jianghu elder?
- The programmers of a large factory after 95 were dissatisfied with the department leaders, and were sentenced for deleting the database and running away
- Emnlp2021 𞓜 a small number of data relation extraction papers of deepblueai team were hired
- Detailed explanation of network security bypass network card
- 华为设备配置MCE
- The central rural work conference has released important signals. Ten ways for AI technology to help agriculture can be expected in the future
- 【Markdown语法高级】 让你的博客更精彩(三:常用图标模板)
- [Transformer]On the Integration of Self-Attention and Convolution
- Section I: classification and classification of urban roads
- Take stock of the AI black technologies in the Beijing Winter Olympic Games, and Shenzhen Yancheng Technology
猜你喜欢

Yolact paper reading and analysis

How to apply for free idea with official documents

Paper reproduction: pare

lower_ Personal understanding of bound function

Free data | new library online | cnopendata data data of national heritage stores and auction enterprises

Inventory | ICLR 2022 migration learning, visual transformer article summary

Carrier coordinate system inertial coordinate system world coordinate system

AAAI2022-ShiftVIT: When Shift Operation Meets Vision Transformer
![[Transformer]MViTv1:Multiscale Vision Transformers](/img/de/1f2751f08dbf4ea3f77a403365dbda.jpg)
[Transformer]MViTv1:Multiscale Vision Transformers

Click the icon is not sensitive how to adjust?
随机推荐
Cartographer learning record: cartographer Map 3D visualization configuration (self recording dataset version)
AAAI2022-ShiftVIT: When Shift Operation Meets Vision Transformer
Carrier coordinate system inertial coordinate system world coordinate system
Click the icon is not sensitive how to adjust?
The central rural work conference has released important signals. Ten ways for AI technology to help agriculture can be expected in the future
Concurrent search set
The programmers of a large factory after 95 were dissatisfied with the department leaders, and were sentenced for deleting the database and running away
Some details about memory
lower_ Personal understanding of bound function
华为设备配置通过GRE隧道接入虚拟专用网
Network adapter purchase guide
使用acme.sh自动申请免费SSL证书
Deep search + backtracking
What is a smart network card? What is the function of the smart network card?
Sealem finance builds Web3 decentralized financial platform infrastructure
Win10+manjaro dual system installation
Technical dry goods: how to select the most suitable RDMA network card
Share | defend against physically realizable image classification attacks
New product pre-sale: 25g optical network card based on Intel 800 series is coming
Huawei equipment is configured with bgp/mpls IP virtual private network