Create Lua scripts

To add small features to Qt Creator, create and run Lua scripts.

The sample script adds a string at the current cursor position in the editor.

To create Lua scripts:

  1. Go to Tools > Scripting > New Script.
  2. In File name, enter a name for the script file.
  3. Select Finish to create the script file.
  4. Edit the sample script.

Run Lua scripts

To run Lua scripts:

  1. Go to Tools > Scripting.
  2. Select a script, and then select Run.

Edit Lua scripts

To edit Lua scripts:

  1. Go to Tools > Scripting.
  2. Select a script, and then select Edit.

See also Record text editing macros.

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.