当前位置:网站首页>QT creator code style plug-in beautifier
QT creator code style plug-in beautifier
2022-07-27 08:03:00 【Tang Shuncai】
Preface
Qt Creator It can pass through Ctrl+A Future generations Ctrl+i Auto format , The formatting here should be limited to indent formatting , But not for brace position 、 Spaces before and after parentheses 、 The space before and after the operator is used for formatting , To achieve something similar to VS Comprehensive code style formatting , You need to use plug-ins .
1、 Turn on Beautifier plug-in unit
help -> About plug-ins 

restart qt Creator
2、 To configure Astyle
After starting the plug-in, in the tool - Options will have Beautifier Configuration item for , Start this function , And choose Artisitic Style,Qt It also supports two other ClangFomat and Uncrustify.
(1) download http://astyle.sourceforge.net/ Go to the above page , choice download, then download latest version You can download it. win edition , Whether the compiler is vs still mingw All available , If it is linux Next use qt, You need to open the folder below separately to download the latest version linux The file compiles itself .
For example, store in windows Catalog : D://format

(2) To configure 

Custom coding style
astyle Provides a series of built-in code styles :
style=allman style=java style=kr style=stroustrup style=whitesmith style=vtk style=ratliff style=gnu style=linux style=horstmann style=1tbs style=google style=mozilla style=pico style=lisp
Need to be in Artisitic style Of use custom style Pass through Add add to 
Active trigger code formatting : Open a document , And then through tools -> Beautifier -> Artisitic style -> Fomat You can format the current document :
Automatic use : Any document will be automatically formatted when it is modified and saved :
Turn on vim edit :
wq!
边栏推荐
- 擎创科技加入龙蜥社区,共建智能运维平台新生态
- Comprehensive analysis of ADC noise-02-adc noise measurement method and related parameters
- "Intermediate and advanced test questions": what is the implementation principle of mvcc?
- Digital transformation driven by enterprise architecture!
- mqtt指令收发请求订阅
- [day42 literature intensive reading] a Bayesian model of perfect head centered velocity during smooth pursuit eye movement
- Can Linux install sqlserver
- Convert objects to key value pairs
- 瑞芯微RK3399-I2C4挂载EEPROM的修改案例
- Day111. Shangyitong: integrate nuxt framework, front page data, hospital details page
猜你喜欢
![[flight control development foundation tutorial 4] crazy shell · open source formation UAV - serial port (optical flow data acquisition)](/img/49/8e5374fee0cbf48115159ac3ff23c6.png)
[flight control development foundation tutorial 4] crazy shell · open source formation UAV - serial port (optical flow data acquisition)
![[resolved] the new version of pychart (2022) connects to the server to upload files and reports an error of](/img/13/573d8ae55eb25580a5628b469dfab3.png)
[resolved] the new version of pychart (2022) connects to the server to upload files and reports an error of "command Rsync is not found in path", and the files cannot be synchronized

Usage scenarios for automated testing

"Intermediate and advanced test questions": what is the implementation principle of mvcc?

Data extraction 2

Convert objects to key value pairs

An ordinary autumn recruitment experience

The dragon lizard exhibition area plays a new trick this time. Let's see whose DNA moved?
![[pytorch] resnet18, resnet20, resnet34, resnet50 network structure and Implementation](/img/44/52c7dc6871fd43223eadfd394e159e.png)
[pytorch] resnet18, resnet20, resnet34, resnet50 network structure and Implementation

DEMO:PA30 银行国家码默认CN 增强
随机推荐
这次龙蜥展区玩的新花样,看看是谁的 DNA 动了?
【万字长文】吃透负载均衡,和阿里大牛的技术面谈
On data security
Things come to conform, the future is not welcome, at that time is not miscellaneous, neither love
C event usage case subscription event+=
Leetcode56. Consolidation interval
C language: optimized Hill sort
glGetUniformLocation,glUniform4f
C#委托的使用案例
Enhancement: BTE process introduction
[ten thousand words long article] thoroughly understand load balancing, and have a technical interview with Alibaba Daniel
Leetcode54. Spiral matrix
Harbor正确密码登录不上去
SETTA 2020 国际学术会议即将召开,欢迎大家参加!
[day42 literature intensive reading] a Bayesian model of perfect head centered velocity during smooth pursuit eye movement
一段平平无奇的秋招经历
Lua迭代器
[applet] the upload of the wechat applet issued by uniapp failed error: error: {'errcode': -10008,'errmsg':'Invalid IP
【飞控开发基础教程4】疯壳·开源编队无人机-串口(光流数据获取)
Dormitory access control system made by imitating the boss (III)