Doc: Select the tool to automatically format QML files

For example, qmlformat.

Task-number: QTCREATORBUG-28721
Change-Id: I509cba3fd842f94e7656a3356cc1de81e41fd8e2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Leena Miettinen
2023-02-22 16:57:00 +01:00
parent 3d8b46685a
commit a8e424f75e
4 changed files with 10 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -729,8 +729,16 @@
To automatically format QML/JS files upon saving, select \uicontrol Edit >
\uicontrol Preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} >
\uicontrol {Enable auto format on file save}.
To only format files that belong to the current project, select
\uicontrol {Restrict to files contained in the current project}.
\image qtcreator-qml-js-editing.png "QML/JS Editing preferences"
To use an external tool, such as \l {qmlformat}, which automatically
formats QML files according to QML coding conventions, select
\uicontrol {Use custom command instead of built-in formatter}. In
the \uicontrol Command field, enter the path to the tool. In the
\uicontrol Arguments field, enter options for running the tool.
\image qtcreator-qml-js-editing.webp {QML/JS Editing preferences}
\if defined(qtcreator)
\section1 Inspecting Preprocessed C++ Code

View File

@@ -26,7 +26,7 @@
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Qt Quick} >
\uicontrol {QML/JS Editing} > \uicontrol {Always show Qt Quick Toolbar}.
\image qtcreator-qml-js-editing.png "QML/JS Editing preferences"
\image qtcreator-qml-js-editing.webp {QML/JS Editing preferences}
Drag the toolbar to pin it to another location. Select
\inlineimage icons/pin.png