Aggiungere frammenti di codice al menu di completamento automatico
Per aggiungere frammenti di codice o di testo nell'editor dei frammenti:
- Selezionare " Preferences " > " Text Editor " > " Snippets".

- In " Group", selezionare il tipo di frammento da aggiungere.
- Selezionare " Add".
- Specificare un trigger. Se il trigger è già in uso, aggiungere una variante opzionale. Queste appariranno nell’elenco dei suggerimenti durante la scrittura del codice. Specificare inoltre una stringa di testo o un costrutto di codice C++ o QML nell’editor degli snippet, a seconda della categoria dello snippet.
È possibile utilizzare variabili predefinite negli snippet.
Vedi anche Completamento del codice CMake, Completamento del codice, Utilizzo delle variabili " Qt Creator ", Completamento, Nim e Snippet.
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.