はじめに

Qt Extension for VS Code が Qt のインストールと CMake キットを検出できるか確認するために、Qt のサンプルを開いてビルドと実行を行ってください。

VS Code で Qt サンプルをビルドして実行します。

VS Code で Qt サンプルプロジェクトを開き、実行します:

  1. Qt Extension for VS Code をインストールします。
  2. Qt インストールから Qt サンプル(CMakeLists.txt ファイルがある)を含むフォルダを開きます。
  3. Command Palette に移動し、Qt: Register Qt installation を選択して Qt バージョンを登録します。
  4. Command Palette に移動し、Qt: Set the recommended Qt Extension settings を選択して、ステータスバーに登録された Qt CMake キットを表示します。
  5. Command Palette にアクセスし、Qt: Scan for kits を選択します。次に、Qt のバージョンとツールチェーンに一致するキットを選択します。
  6. ステータスバーで選択したターゲットをターミナル・ウィンドウで起動する を選択します。
  7. プロジェクトをビルドして実行するために、起動ターゲットとして実行ファイルを選択します。

チュートリアルを選択して、Qt アプリケーションの開発について学ぶことができます。プロジェクトウィザードのテンプレートを使用して、独自のアプリケーションプロジェクトを作成します。

インストール」、「Qt インストールの登録」、「チュートリアル」、「Qt プロジェクトの作成」も参照してください

© 2026 The Qt Company Ltd. 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.