How to use Qt Creator's ClangFormat plugin?
Solved
Qt Creator and other tools
-
My set-up:
- Windows 10
- Qt Creator 4.10.2
- Microsoft Visual Studio 2017
I have just enabled the ClangFormat plugin in Qt Creator, and then restarted Qt Creator as instructed.
Now, how can I use ClangFormat? For example, how do I reformat a source file with the ClangFormat plugin?
According to https://www.qt.io/blog/2019/04/17/clangformat-plugin-qt-creator-4-9 :
"If you have this plugin enabled you can simply invoke the executable by the shortcut or apply formatting on save."
Where is the ClangFormat command? What is its shortcut? How can apply formatting on save?
-
Hi,
It's explained in the Qt Creator manual.