Qt Graphs ウィジェット

QML アプリケーションのみをビルドする際に、QtWidgets への依存を避けるため、ウィジェットサポートは独自のモジュールに含まれています。

モジュールの使用

Qt モジュールの C++ API を使用するには、モジュールライブラリを直接リンクするか、他の依存関係を介してリンクする必要があります。CMakeや qmakeなど、いくつかのビルドツールはこのための専用サポートを持っています。

CMake でのビルド

find_package() コマンドを使用して、必要なモジュール・コンポーネントをQt6 パッケージから探します:

find_package(Qt6 REQUIRED COMPONENTS GraphsWidgets)
target_link_libraries(mytarget PRIVATE Qt6::GraphsWidgets)

詳細については、CMakeによるビルドの概要を参照してください。

qmakeでのビルド

モジュールをqmakeでビルドするように設定するには、プロジェクトの.proファイルにQT 変数の値としてモジュールを追加します:

QT += graphswidgets

APIリファレンス

ライセンスと使用許諾

Qt Graphs Widgetsは、The Qt Companyの商用ライセンスでご利用いただけます。さらに、GNU General Public License, version 3でも利用可能です。詳細についてはQt Licensingを参照してください。

© 2025 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.