Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. how to fix QT Project ERROR: Unknown module(s) in QT: charts
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved Mobile and Embedded
14 Posts 4 Posters 17.4k Views 1 Watching
  • 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

    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
    
    
    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @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
    0
    • jsulmJ jsulm

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

      S Offline
      S Offline
      swansorter
      wrote on last edited by
      #3

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

      jsulmJ 1 Reply Last reply
      0
      • S swansorter

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

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @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
        0
        • jsulmJ jsulm

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

          S Offline
          S Offline
          swansorter
          wrote on last edited by
          #5

          @jsulm I checked it same version only

          jsulmJ 1 Reply Last reply
          0
          • S swansorter

            @jsulm I checked it same version only

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @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
            0
            • jsulmJ jsulm

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

              S Offline
              S Offline
              swansorter
              wrote on last edited by
              #7

              @jsulm not working even after the clean and rebuild

              KroMignonK 1 Reply Last reply
              0
              • S swansorter

                @jsulm not working even after the clean and rebuild

                KroMignonK Offline
                KroMignonK Offline
                KroMignon
                wrote on last edited by
                #8

                @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
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #9

                  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
                  0
                  • S Offline
                    S Offline
                    swansorter
                    wrote on last edited by
                    #10

                    how to check previous qt version of the project

                    jsulmJ 1 Reply Last reply
                    0
                    • KroMignonK KroMignon

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

                      S Offline
                      S Offline
                      swansorter
                      wrote on last edited by
                      #11

                      @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
                      0
                      • SGaistS SGaist

                        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 ?

                        S Offline
                        S Offline
                        swansorter
                        wrote on last edited by
                        #12

                        @SGaist from qt creator

                        1 Reply Last reply
                        0
                        • S swansorter

                          how to check previous qt version of the project

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #13

                          @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
                          1
                          • jsulmJ jsulm

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

                            S Offline
                            S Offline
                            swansorter
                            wrote on last edited by
                            #14

                            @jsulm thank you sir

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved