Doc: Describe creating and running Lua scripts

Task-number: QTCREATORBUG-31510
Change-Id: I5983ba197f120ae6c42b9adc4e4a81d32522fc8c
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Leena Miettinen
2024-10-29 10:37:08 +01:00
parent 05fbfe8ea6
commit 787b525e44
4 changed files with 53 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ General
([Blog Post](https://www.qt.io/blog/review-new-themes-for-qt-creator))
* Added `Tools > Scripting > New Script` for creating Lua based Qt Creator
scripts
([Documentation](https://doc-snapshots.qt.io/qtcreator-15.0/creator-how-to-create-lua-scripts.html))
* Plugins
* Added `DocumentationUrl` and new mandatory fields `Id` and `VendorId`
to the plugin meta data

View File

@@ -0,0 +1,46 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-how-to-create-lua-scripts.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-edit
\title Create Lua scripts
To add small features to \QC, create and run \l{Lua}{Lua scripts}.
The sample script adds a string at the current cursor position in the
editor.
To create Lua scripts:
\list 1
\li Go to \uicontrol Tools > \uicontrol Scripting >
\uicontrol {New Script}.
\li In \uicontrol {File name}, enter a name for the script file.
\li Select \uicontrol Finish to create the script file.
\li Edit the sample script.
\endlist
\section1 Run Lua scripts
To run Lua scripts:
\list 1
\li Go to \uicontrol Tools > \uicontrol Scripting.
\li Select a script, and then select \uicontrol Run.
\endlist
\section1 Edit Lua scripts
To edit Lua scripts:
\list 1
\li Go to \uicontrol Tools > \uicontrol Scripting.
\li Select a script, and then select \uicontrol Edit.
\endlist
\sa {Record text editing macros}
*/

View File

@@ -56,6 +56,6 @@
To assign a keyboard shortcut to a text editing macro, go to
\preferences > \uicontrol Environment > \uicontrol Keyboard.
\sa {Assign keyboard shortcuts}, {Edit Code}{How To: Edit Code},
{Navigate with locator}
\sa {Assign keyboard shortcuts}, {Create Lua scripts},
{Edit Code}{How To: Edit Code}, {Navigate with locator}
*/

View File

@@ -5,6 +5,10 @@
\externalpage https://doc.qt.io/index.html
\title Qt Documentation
*/
/*!
\externalpage https://www.lua.org/
\title Lua
*/
/*!
\externalpage https://www.freedesktop.org/software/systemd/man/latest/systemd-coredump.html
\title systemd-coredump