Auto-formatting C++ code using AStyle in Qt Creator's Beautifier Plugin
Today I find my code does not looks good in Qt Creator. So I installed AStyle to use it with the beautifier plugin.
- download AStyle here http://astyle.sourceforge.net/
- cd astyle/build/mac & make // executable will be generated in bin floder
- go to Qt Creator -> Preferences -> Beautifier -> Artistic Style put the address of the generated executable in Artistic Style command
- specify a style in options.
- Qt Creator -> Tools -> Beautifier -> Artistic Style -> Format Current File
It works great.
···