QT related settings

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
Insert image description here
and choose your favorite theme

Insert image description here
Font size font settings
Insert image description here

2.2 Formatting and beautifying code plug-in settings

First download a formatting plug-in astyle
and click on the official website download address

Insert image description here
Click to download, don't click multiple times, the response is a bit slow.
Insert image description here
Unzip the downloaded package and put it in the QT installation path. It is best to have a shorter name.
I put it here.
Insert image description here

Set up below
Insert image description here

Select beautifier and then close it.
Insert image description here
Select as shown in the figure.
Insert image description here
Continue to select add as follows.
Insert image description here
Insert image description here

Fill in the following
Insert image description here
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

Guess you like

Origin blog.csdn.net/qq_42817360/article/details/132582865