[Interest] clang-format QML files

Matthew Fincham matthewf at cat.co.za
Mon Sep 6 21:32:35 CEST 2021

Hi all

Has anyone successfully used clang-format to format QML files?

I have seen 'qmlformat' but it doesn't quite fit our requirements. We 
have a evolved some internal standards, like declaring a "private" 
section at the end of the QML file, that get misplaced. Comments too end 
up in the wrong place. 'qmlformat' is actually very close. If it could 
be configured to read boundary markers, and not move code across the 
boundaries it would do the trick for us.

clang-format has worked wonders for the C++ code. It would be great to 
use it for QML too.

Many thanks
Matthew Fincham

More information about the Interest mailing list