Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to configure QtCharts withint CMakelist.txt
lingfeng last edited by
There is a fetal error "QtCharts/QChartView: No such file or directory" when running make.
I tried to add Charts to qt5_use_modules, but it reports no such module.
Any other feature works fine in my cmake project. My Qt version is 5.9.1. OS is ubuntu 16.04.
A Former User last edited by
QtCharts is an add-on module. Probably you forgot installing it.
mchinand last edited by
What version of CMake do you have? Something like this should work if you installed the QtCharts add-on and have a recent version of CMake
... # include other modules above find_package(Qt5Charts) . . . add_executable(myapp main.cpp) # Use the Widgets and Charts modules from Qt 5. target_link_libraries(myapp Qt5::Widgets Qt5::Charts)