[Interest] Beautifier for QML

Shawn Rutledge Shawn.Rutledge at qt.io
Mon Feb 6 07:23:26 CET 2017


On Feb 5, 2017, at 10:18, Shantanu Tushar <shaan7in at gmail.com> wrote:

> Hey folks,
> 
> In our project we use astyle with the Qt Creator beautifier plugin,
> its quite neat for C++. I was wondering if anything similar existed
> for QML?

Control-I re-indents the current line or the selection.  Control-A selects everything.

> Quite a lot of devs in our team are shying away from Qt/QML
> because of that reason.

Wow, never heard that one before.  They are having so much trouble using the editor to write it normally in the first place?  Sounds like vanity anyway.  For Qt examples which thousands of people will read, maybe we should worry about it, but in regular production code?

You can probably repurpose some other tool for which the supported syntax is close enough - maybe a JS reformatter tool of some sort?  Or even a C++ tool if its parser isn’t too picky?




More information about the Interest mailing list