このページでは

コード補完

コード補完の環境設定を行うには、環境設定>Text Editor >Completion を選択します。

テキストエディタ環境設定の「補完」タブ

コード補完の動作

デフォルトでは、コード補完は大文字と小文字を区別しません。大文字と小文字を区別するには、Case-sensitivity フィールドでFull またはFirst Letter を選択します。

デフォルトでは、コード補完は常に呼び出されますが、Activate completion フィールドでこの動作を変更して、Manually またはWhen Triggered を呼び出すことができます。

Timeout in ms フィールドで、コード補完のタイムアウトをミリ秒単位で設定できます。

Character threshold フィールドで、コード補完が発動するまでに入力する文字数を指定する。

補完が手動で呼び出されると、Qt Creator は候補リストの共通接頭辞を補完します。これは、類似した名前のメンバを複数持つクラスで特に役立ちます。この機能を無効にするには、Autocomplete common prefix をクリアします。

Automatically split strings を選択すると、Enterを選択したときのカーソル位置に終端引用符が追加され、次の行の先頭に文字列の残りの部分の前に開始引用符が追加されることによって、文字列が2行に分割されます。さらに、Shift+Enterを選択すると、カーソル位置にエスケープ文字が挿入され、残りの文字列が次の行に移動します。

自動的にマッチする文字を挿入する

コードを選択して括弧や引用符を入力すると、選択範囲の最後に一致する閉じ文字が自動的に挿入されます。

デフォルトでは、自動的に挿入されたテキストはハイライトされ、アニメーションで表示されます。

Complete CMake code」、「Enclose code in brackets or quotes」、「Nim」、「Complete code」、「Snippets」も参照してください

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.