Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved how to fix QT Project ERROR: Unknown module(s) in QT: charts

    Mobile and Embedded
    4
    14
    10061
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      swansorter last edited by

      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
      
      
      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @swansorter last edited by

        @swansorter Install Qt Charts first (it is not installed by default).

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        S 1 Reply Last reply Reply Quote 0
        • S
          swansorter @jsulm last edited by

          @jsulm i installed it
          if i create new project then its working,but if run old project not working

          jsulm 1 Reply Last reply Reply Quote 0
          • jsulm
            jsulm Lifetime Qt Champion @swansorter last edited by

            @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.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply Reply Quote 0
            • S
              swansorter @jsulm last edited by

              @jsulm I checked it same version only

              jsulm 1 Reply Last reply Reply Quote 0
              • jsulm
                jsulm Lifetime Qt Champion @swansorter last edited by

                @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).

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                S 1 Reply Last reply Reply Quote 0
                • S
                  swansorter @jsulm last edited by

                  @jsulm not working even after the clean and rebuild

                  KroMignon 1 Reply Last reply Reply Quote 0
                  • KroMignon
                    KroMignon @swansorter last edited by

                    @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.

                    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                    S 1 Reply Last reply Reply Quote 0
                    • SGaist
                      SGaist Lifetime Qt Champion last edited by

                      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 ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        swansorter last edited by

                        how to check previous qt version of the project

                        jsulm 1 Reply Last reply Reply Quote 0
                        • S
                          swansorter @KroMignon last edited by

                          @KroMignon i forgot previous version of qt which used to build the project
                          but now i am using5.9.1 gcc 64 bit

                          1 Reply Last reply Reply Quote 0
                          • S
                            swansorter @SGaist last edited by

                            @SGaist from qt creator

                            1 Reply Last reply Reply Quote 0
                            • jsulm
                              jsulm Lifetime Qt Champion @swansorter last edited by

                              @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.

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              S 1 Reply Last reply Reply Quote 1
                              • S
                                swansorter @jsulm last edited by

                                @jsulm thank you sir

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post