Qt Charts module provides a set of easy to use chart components. It uses the Qt Graphics View Framework, therefore charts can be easily integrated to modern user interfaces. Qt Charts can be used as QWidgets, QGraphicsWidget, or QML types. Users can easily create impressive graphs by selecting one of the charts themes.
To import Qt Charts QML types, add the following import statement to your
import QtCharts 2.2
If you intend to use Qt Charts C++ classes in your application, use the following include and using directives:
#include <QtCharts> using namespace QtCharts;
Note: Projects created with Qt Creator's Qt Quick Application wizard are based on the Qt Quick 2 template that uses QGuiApplication by default. All such QGuiApplication instances in the project must be replaced with QApplication as the module depends on Qt's Graphics View Framework for rendering.
To link against the Qt Charts module, add this line to your
qmake project file:
QT += charts
Changes to Qt Charts lists important changes in the module API and functionality that were done for the Qt 6 series of Qt.
© 2024 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.