オートコンプリート・メニューにコード・スニペットを追加する

スニペットエディタにコードまたはテキストスニペットを追加するには、次の手順に従います:

  1. 環境設定>Text Editor >Snippets を選択します。

    テキストエディタ環境設定のスニペットタブ

  2. Group で、追加するスニペットのタイプを選択します。
  3. Add を選択します。
  4. トリガーを指定します。トリガーがすでに使用されている場合は、オプションのバリアントを追加します。これらは、コードを書くときに、候補リストに表示されます。また、スニペット カテゴリーに応じて、スニペット エディターでテキスト文字列または C++ または QML コード構文を指定します。

    スニペットでは定義済みの変数を使用できます。

Complete CMake codeComplete codeUseQt Creator variablesNimCompletionSnippetsも参照してください

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.