forked from qt-creator/qt-creator
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:
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB |
BIN
doc/qtcreator/images/qtcreator-qml-js-editing.webp
Normal file
BIN
doc/qtcreator/images/qtcreator-qml-js-editing.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
@@ -729,8 +729,16 @@
|
|||||||
To automatically format QML/JS files upon saving, select \uicontrol Edit >
|
To automatically format QML/JS files upon saving, select \uicontrol Edit >
|
||||||
\uicontrol Preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} >
|
\uicontrol Preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} >
|
||||||
\uicontrol {Enable auto format on file save}.
|
\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)
|
\if defined(qtcreator)
|
||||||
\section1 Inspecting Preprocessed C++ Code
|
\section1 Inspecting Preprocessed C++ Code
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Qt Quick} >
|
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Qt Quick} >
|
||||||
\uicontrol {QML/JS Editing} > \uicontrol {Always show Qt Quick Toolbar}.
|
\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
|
Drag the toolbar to pin it to another location. Select
|
||||||
\inlineimage icons/pin.png
|
\inlineimage icons/pin.png
|
||||||
|
|||||||
Reference in New Issue
Block a user