Add code snippets to the auto-complete menu
To add code or text snippets in the snippet editor:
- Select Preferences > Text Editor > Snippets.
- In Group, select the type of snippet to add.
- Select Add.
- Specify a trigger. If the trigger is already in use, add an optional variant. They appear in the list of suggestions when you write code. Also specify a text string or QML code in the snippet editor, depending on the snippet category.
See also Completion and Snippets.
Available under certain Qt licenses.
Find out more.