コードを角括弧または引用符で囲む

コードを選択し、以下の開始文字のいずれかを入力すると、選択範囲の末尾に一致する終了文字が追加されます:

  • (
  • {
  • [
  • <
  • "
  • '

一致する文字を自動的に挿入するかどうかを指定するには、Preferences >Text Editor >Completion に移動し、Automatically Insert Matching Characters でオプションを選択します。

テキストエディタの設定にある「完了」タブ

また、Qt Creator では、生文字列リテラルプレフィックスの終了文字が自動的に挿入されます。

補完」、「手順:コードの編集」、および「コードの編集も参照してください

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.