aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSemih Yavuz <semih.yavuz@qt.io>2025-05-16 15:08:47 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2025-05-20 17:49:20 +0000
commitfb4fe194414a6ee5f4466407a3394275114769f2 (patch)
treec9f1d483bf7ce601c02c7f192e961ae15d46fc8c
parenta8a77a03d589010c6424c0c08aa6e01936b80652 (diff)
qmlformat: document .qmlformat.ini settings for Qt 6.9
Task-number: QTBUG-127286 Change-Id: I39e8ee5cfe96257ce6b0244ba6aebb09fc33a936 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a485ea061cd87a715903d572f3a03c7da7eb3d42) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qml/doc/src/tools/qtqml-tooling-qmlformat.qdoc47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/qml/doc/src/tools/qtqml-tooling-qmlformat.qdoc b/src/qml/doc/src/tools/qtqml-tooling-qmlformat.qdoc
index b8f56f5437..9cb1ac3824 100644
--- a/src/qml/doc/src/tools/qtqml-tooling-qmlformat.qdoc
+++ b/src/qml/doc/src/tools/qtqml-tooling-qmlformat.qdoc
@@ -127,6 +127,53 @@ settings file can be obtained by passing the \c{--write-defaults} flag. This gen
\warning \c{--write-defaults} will overwrite any existing settings and comments!
+\target qmlformat-settings
+The following settings are available in the \c{.qmlformat.ini} file:
+\table
+\header
+ \li Setting
+ \li Default Value
+ \li Description
+
+\row
+ \li UseTabs
+ \li false
+ \li Uses tabs instead of spaces.
+
+\row
+ \li IndentWidth
+ \li 4
+ \li How many spaces are used when indenting.
+
+\row
+ \li NewlineType
+ \li native
+ \li Overrides the new line format to use (\c {native}, \c {macos}, \c {unix}, \c {windows}).
+
+\row
+ \li NormalizeOrder
+ \li false
+ \li Reorders the attributes of the objects according to the QML coding guidelines.
+
+\row
+ \li FunctionsSpacing
+ \li false
+ \li Ensures spaces between functions (only works with normalize option).
+
+\row
+ \li ObjectsSpacing
+ \li false
+ \li Ensures spaces between objects (only works with normalize option).
+
+\row
+ \li MaxColumnWidth
+ \li -1
+ \li Breaks the line into multiple lines if it exceeds
+ the specified width. Use -1 to disable line
+ wrapping (default).
+
+\endtable
+
\section3 Formatting a List of Files
While you can pass a list of files to be formatted as arguments, qmlformat provides
\c {-F} option to format a set of files stored in a file. In this case, formatting will happen