how to fix QT Project ERROR: Unknown module(s) in QT: charts
-
sir
Project ERROR: Unknown module(s) in QT: charts
this is .pro file#------------------------------------------------- # # Project created by QtCreator 2019-11-25T13:21:15 # #------------------------------------------------- QT += core gui QT += charts QT += serialport QT += network QT += multimedia greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = ApplicationLauncher_17 TEMPLATE = app # The following define makes your compiler emit warnings if you use # any feature of Qt which has been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp \ mainwindow.cpp \ colorpaddialog.cpp \ numberpaddialog.cpp \ keyboard.cpp HEADERS += \ mainwindow.h \ colorpaddialog.h \ numberpaddialog.h \ keyboard.h FORMS += \ mainwindow.ui \ colorpaddialog.ui \ numberpaddialog.ui \ keyboard.ui RESOURCES += \ images.qrc DISTFILES += QMAKE_CXXFLAGS += -std=c++0x
-
@swansorter Install Qt Charts first (it is not installed by default).
-
@swansorter said in how to fix QT Project ERROR: Unknown module(s) in QT: charts:
but if run old project not working
Do you have more than one Qt version installed? Make sure you use the Qt version where Qt Charts is installed.
-
@swansorter Then do a clean rebuild of your old project: delete build folder run qmake and build.
I don't see a reason why it should not work with one project but another one it does (if you really use same Qt version). -
@swansorter said in how to fix QT Project ERROR: Unknown module(s) in QT: charts:
not working even after the clean and rebuild
This was not what @jsulm asks you.
You have to use the right QChar version.
You cannot use QChart build for Qt 5.12 with Qt 5.10 for example. -
Hi,
Are you doing that from the command line or Qt Creator ?
If the former, are you using the full path the to qmake executable matching the Qt version with the charts module installed ?
If the later, did you double check that you are using the Kit using the Qt version with the charts module installed ? -
how to check previous qt version of the project
-
@KroMignon i forgot previous version of qt which used to build the project
but now i am using5.9.1 gcc 64 bit -
@swansorter said in how to fix QT Project ERROR: Unknown module(s) in QT: charts:
how to check previous qt version of the project
There is no need for that. Simply make sure you use Qt version (in QtCreator check Kit you're using) which has Qt Charts. So, please make sure you use the exact same Kit for old project as you use for the new project. You can post a screen-shot of your Kits tabs in QtCreator settings.