当前位置:网站首页>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 ‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧
边栏推荐
- ShardingJDBC 分库分表详解
- To understand Devops, you must read these ten books!
- idea如何设置导包不带*号
- 5、Embedding
- Swintransformer network architecture
- CVPR 2022 | 元学习在图像回归任务的表现
- JS using RSA encryption and decryption
- Su directly switches to super administrator mode, so that many error reports can be avoided
- [raspberry pie]: (IV) camera advanced
- CAS optimistic lock
猜你喜欢

Idea displays services on the console to uniformly manage all jetty services,

Extract the new Chinese cross modal benchmark zero from 5billion pictures and texts, and Qihoo 360's new pre training framework surpasses many SOTAS

叶子分享站PHP源码下载

Uniapp wallpaper applet source code / double ended wechat Tiktok applet source code

The safety of link 01 was questioned, and "ultra high strength" became "high strength"_ Publicity_ Steel_ problem

使用ubantu时,遇见的一些小毛病和解决方法

Qiushengchang: Practice of oppo commercial data system construction

RMI, JNDI, LDAP introduction +log4j vulnerability analysis

Installation and use of rolabelimg
![[MySQL] Cartesian product - multi table query (detailed explanation)](/img/46/6a9a62b35eaa538232da1d738b3931.jpg)
[MySQL] Cartesian product - multi table query (detailed explanation)
随机推荐
Pat class a 1139 first contact
\begin{algorithm} 笔记
布局管理中的sizePolicy的策略问题
MySQL transaction introduction and transaction isolation level
Unit sshd.service could not be found
R language uses the sum function of epidisplay package to calculate the descriptive statistical summary information of the specified variables in dataframe under different grouped variables and visual
R语言使用plot函数可视化数据散点图,使用font.axis参数指定坐标轴刻度标签的字体类型为斜体字体(italic)
(三)Golang - 数据类型
latex表格 在线生成
redis. clients. jedis. exceptions. JedisConnectionException: Could not get a resource from the pool
Qiushengchang: Practice of oppo commercial data system construction
每天5分钟玩转Kubernetes | 汇总
Crazy temporary products: super low price, big scuffle and new hope
Swintransformer network architecture
Uniapp壁纸小程序源码/双端微信抖音小程序源码
记录使用yolov5进行旋转目标的检测
redis.clients.jedis.exceptions.JedisDataException: NOAUTH Authentication required
Atlassian Confluence 远程代码执行漏洞(CVE-2022-26134)漏洞复现
Google browser debugging skills
\Begin{algorithm} notes