Unsolved Cannot find QtCharts at all - looked everywhere
-
So I've been trying to install QtCharts for like 2 days now - when I open the QT Maintainance Tool, it tells me that it is installed (it is checked when I start the tool) - but I can't find it anywhere, I've been searching for it in the Qt file and when I installed it with the tool it told me it installs a 0 MB update for some whatever reason.
The only thing I can find regarding charts is pieview.cpp and pieview.cpp in Qt\Examples...\itemviews. I am using qt 5.15.2 - do I need to update it a bit? Actually clueless now. Thank you
-
Have you tried compiling some example? Create a new project, add
QT+=charts
in your project file, and see if it compiles. -
Don't know how to do that - I'm using CMakeLists and CLion
-
find_package(QT NAMES Qt6 Qt5 COMPONENTS Charts REQUIRED) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Charts REQUIRED)
-
@sierdzio said in Cannot find QtCharts at all - looked everywhere:
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Charts REQUIRED)
This is what I'm getting: CMake Error at C:/Qt/5.15.2/mingw81_64/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
Could not find a package configuration file provided by "Qt5Charts" with
any of the following names:Qt5ChartsConfig.cmake qt5charts-config.cmake
Add the installation prefix of "Qt5Charts" to CMAKE_PREFIX_PATH or set
"Qt5Charts_DIR" to a directory containing one of the above files. If
"Qt5Charts" provides a separate development package or SDK, be sure it has
been installed. -
Weird. Maybe try a full reinstall of whole Qt?
-
I tried actually that - is Qt charts not available on 5.15.2? I'm using the community version
-
@calin2110 You need to select QtCharts separately in online installer or maintenance tool (QtCharts is not installed by default).
-
https://imgur.com/a/H3L3HpX - you can see here it's already checked if it helps you
-
Remember that for QtCharts you either need the commercial license or make your own software GPL. In the community version of Qt the QtCharts module is only available under GPL and not LGPL. If you want to avoid this you can try Qwt instead.