当前位置:网站首页>A variety of Qt development methods, which do you choose?
A variety of Qt development methods, which do you choose?
2022-06-12 17:05:00 【yinchengkai】
qt Is it worth learning ?
There's really a lot to learn about embedded systems , We may say that if we don't write the interface, we don't need to learn qt 了 ? I don't agree with .
Qt The implementation of the system mainly adopts p-impl methods , Implementation interface and implementation separation , It has a good message circulation mechanism , Some objects are related to threads , It also has the help of moc Generate reflection meta information , This design method is still very applicable today .
qt The kernel part is completely interface independent , You can put it away Qt GUI Part to learn and use Qt. When you learn completely qt And the idea behind it , You'll find that writing elegant code is a very simple thing , It can be applied to all the processes after you .
So what kind of Qt The development method is better or easy to get started ?
QT do UI The interface is usually simple to use C++ Hard coding , Can be used directly QWidget Parts , Instead of adopting QT Designer do UI Interface , It's not the use of QML+Javascript, It's flexible, but it's a lot of code , Usually used QT Development , There are three ways :
Use QT GUI frame , Hard coding alone
Use QT Designer do UI Interface , Be similar to MFC Drag the control as well , And then use C++ Write logic .
use QML do UI,JavaScript Write logic ,C++ Writing backstage , Mixed programming in three languages .
that Qt How many common development methods are there ? In general, it is divided into the following 2 Kind of
The first one is : pure QtCreator The way ,QtCreator code +MinGW or MSVC Or other compilers .
The second kind :VS+Qt library , hold Qt As an interface library in VS Call in .VS code +MSVC compile .

Use VS+Qt The right way to open
If the development of the program just windows Run up , No cross platform , I don't care if I need to use it Qt Creator open , So it is recommended that you use VS+Qt Way to develop .
In this case, you need to install VS、Qt Software , And in VS Install in QT plug-in unit , Configure environment variables and so on , Specific installation and configuration tutorial, you can refer to the online , Give it a try , This article focuses on methods .

Install and reopen VS, There are more than one in the menu bar QT VS Tools, Click on QT Options You can do the next step

VS Speed and debugging function are all over the world Qt Creator, It's great to develop .
Use Qt Creator How to open it
QtCreator+MSVC
Need to install VS( We mainly use its compiler )、Qt Creator Software ,MSVC Debugger installation , adopt windows SDK Tool installation debugger . To configure Qt Creator Compilers and debuggers
open Qt Creator, choice “ Tools ”->“ Options ”, Re selection “Kits”->“ compiler ”, You can see Qt Has been automatically detected MSVC Compiler .

At the same time “Kits”->“Debuggers” Next , The debugger has also been automatically detected .

And then we choose “Kits”->“ Build Suite ”, And then choose Desktop Qt 5.12.0 MSVC2017 64bit,
To configure C/C++ All compilers are :Microsoft Visual C++ Compiler 15.0(x86_amd64);
Configure the debugger to :Auto-detected CDB at D:\Windows Kits\10\Debuggers\x64\cdb.exe.

Qt Creator+MinGW
install Qt creator after , Use it directly Qt Creator code , Use native MinGW compile , This is the simplest , Without any outside help .
At the same time, the installation steps are the simplest , You can do the development after the installation , There's not too much configuration .

Recommended QtCreator+MSVC The way , In terms of speed and cross platform , Debugging function is slightly weak , In addition, there is no engineering conversion problem in this way , Can better support cross platform development .
Conclusion
If cross platform needs to be considered , Then it's best not to use VS+Qt This way, , Project conversion path 、 library 、 There's a lot of trouble with configuration ;
MSVC In the compilation speed and running speed are all explosion MinGW, It is not recommended to use MinGW compile , Let's experience it .
‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧ END ‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧
边栏推荐
- Where is it safer to open an account for thermal coal futures? How much is the thermal coal futures deposit?
- SwinTransformer网络架构
- 大端模式和小端模式的區別
- R语言使用epiDisplay包的aggregate.plot函数可视化每个子集的汇总统计信息(可视化基于单个分组下的阳性指标的概率值及其95%置信区间、基于折线图、仅仅适用于目标类别为二分类)
- 5、Embedding
- (七)循环语句for
- Doctor application | National University of Singapore, Xinchao Wang, teacher recruitment, doctor / postdoctoral candidate in the direction of graph neural network
- [raspberry pie]: (IV) camera advanced
- Recommend AI intelligent drawing repair software
- \Begin{algorithm} notes
猜你喜欢

软件工程 学生信息管理系统 结构化的需求分析

goland变成中文版了怎么修改回英文版

Dongfeng Yueda Kia, Tencent advertising and hero League mobile game professional league cooperate to build a new E-sports ecology

Picture online collection and delivery system source code

快速入门scrapy爬虫框架

多种Qt的开发方式,你选择哪种?

Iscc-2022 part WP

Su directly switches to super administrator mode, so that many error reports can be avoided

图片在线收款发货系统源码

RMI, JNDI, LDAP introduction +log4j vulnerability analysis
随机推荐
Add static route
Basic knowledge of stock introduction: is fixed increase good or bad?
[BSP video tutorial] stm32h7 video tutorial Issue 8: the last issue of the MDK theme, the new generation of debugging technologies event recorder and RTT, and using stm32cubemx to generate project tem
R语言计算data.table在一个分组变量的值固定的情况下另外一个分组变量下指定数值变量的均值
Leetcode 2190. The number that appears most frequently in the array immediately after the key (yes, once)
C # final review programming question (guessed by the teacher)
Installation and use of rolabelimg
MySQL事务简介、事务隔离级别
R language uses ggplot2 to visualize the density graph (curve) of specific data columns in dataframe data, and uses Xlim parameter to specify the range of X axis
Record the use of yolov5 to detect rotating targets
修改自己电脑连接的路由器的配置网址192.168.1.1
Demande de doctorat | xinchao Wang, Université nationale de Singapour
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
JVM memory model and local memory
The R language uses the tabpct function of the epidisplay package to generate a two-dimensional contingency table, and uses the mosaic diagram to visualize the contingency table (two-dimensional conti
redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required
JVM内存模型与本地内存
Gerrit触发Jenkins SonarQube扫描
使用GCC的PGO(Profile-guided Optimization)优化整个系统
[raspberry pie]: (IV) camera advanced