Qt Quick アプリケーションのプロファイル
Qt Creator に統合されているQML Profiler を使用して、Visual Studio から実行するQt Quick アプリケーションをプロファイリングできます。QML Profiler を使用すると、アプリケーションの典型的なパフォーマンス問題(動作が遅い、ユーザーインターフェ イスが応答しないなど)の原因を見つけることができます。
このようなパフォーマンス問題の典型的な原因の1つは、少ないフレームで多すぎるJavaScriptを実行していることです。GUIスレッドが続行できるようになる前にすべてのJavaScriptが戻らなければならず、GUIスレッドの準備ができていない場合、フレームが遅れたり、ドロップされたりします。もう1つの典型的な原因は、GUIスレッドで時間がかかる不可視アイテムの作成や更新です。
Qt Quick アプリケーションをプロファイルするには
- Visual Studio で、Qt Quick アプリケーション・プロジェクトを開きます。
- Solution Explorer でプロジェクトを右クリックし、コンテキスト・メニューからProperties を選択します。
- Configuration Properties >Qt Project Settings を選択します。
- Enable QML Debugging で、Yes を選択します。

- Debugging を選択します。
- Command arguments で Enter を押します:
-qmljsdebugger=port:<number>,block
詳細については、Qt Quick: アプリケーションの起動 を参照してください。
注意: コマンド引数は、デフォルトでEnvironment に設定されているものと競合するため、削除するまでデバッグは機能しません。
- OK を選択します。
- Build に移動し、Build Solution を選択してアプリケーションをビルドします。
- Debug に移動し、Start without Debugging を選択して(またはCtrl+F5 を押して)アプリケーションを実行します。
- Qt Creator でAnalyze を選択し、次に QML Profiler (Attach to Waiting Application).
Qt Creator QML Profiler ダイアログの開始" src="images/qtcreator-start-qml-profiler.webp" title="Qt Creator QML Profiler ダイアログの開始"/>
- Port で、コマンド引数と同じポート番号を設定します。
- OK を選択してプロファイリングを開始します。
- ですぐにプロファイリングが開始されない場合は QML Profilerですぐにプロファイリングが開始されない場合は、Enable Profiling を選択してデータ収集を開始します。
QML デバッグの有効化」、「Qt Creator: QML アプリケーションのプロファイリング」、「Qt Creator: QML アプリケーションのプロファイリング」も参照してください 。
© 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.