Table of contents
1.Install QT
I won’t write any specific tutorials.
2. After installation, you need to make some settings
2.1 Basic font and theme settings
Go to options
and choose your favorite theme
Font size font settings
2.2 Formatting and beautifying code plug-in settings
First download a formatting plug-in astyle
and click on the official website download address
Click to download, don't click multiple times, the response is a bit slow.
Unzip the downloaded package and put it in the QT installation path. It is best to have a shorter name.
I put it here.
Set up below
Select beautifier and then close it.
Select as shown in the figure.
Continue to select add as follows.
Fill in the following
values:
--style=google -p
indent-switches #设置switch整体缩进
indent-namespaces #设置namespace整体缩进
pad-oper #操作符去前后添加空格
#delete-empty-lines # 删除多余空格
add-braces # 单行语句加上大括号
indent=spaces=4 # 4空格缩进
indent-case # 设置case整体缩进
unpad-paren # 移除括号两端多余空格
indent-labels
pad-header
keep-one-line-statements
convert-tabs
indent-preprocessor
align-pointer=name
keep-one-line-blocks
attach-namespaces
max-instatement-indent=120