Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator errors with QtGraphs QML
QtWS25 Last Chance

QtCreator errors with QtGraphs QML

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
25 Posts 4 Posters 1.3k Views
  • 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.
  • T Offline
    T Offline
    Tobias83
    wrote on 28 Mar 2025, 15:06 last edited by
    #1

    Hallo everybody,

    I changed from QtCharts to QtGraphs, because QtCharts is deprecated. But with QtCreator the QML stuff of QtGraphs is not recognized. The prompts GraphsView, LineSeries and VXYModelMapper are "unknown components", while the import QtGraphs prompt is working. On OpenSuse Tumbleweed, there are the following rpm packages in the repo:

    • libQt6Charts6 -> /usr/lib64/
    • libQt6ChartsQml6 -> /usr/lib64/
    • qt6-charts-devel -> /usr/include/qt6/QtCharts/
    • qt6-charts-imports -> /usr/lib64/qt6/qml/QtCharts/
    • qt6-chartsqml-devel -> /usr/include/qt6/QtChartsQml/
    • libQt6Graphs6 -> /usr/lib64/
    • qt6-graphs-devel -> /usr/include/qt6/QtGraphs/
    • qt6-graphs-imports -> /usr/lib64/qt6/qml/QtGraphs/

    Is there maybe a package missing? QtCharts was working and QtGraphs does not.

    In cmake file I have the following entries:

    • find_package(Qt6 6.7 REQUIRED COMPONENTS Qml Core Quick Graphs)
    • include_directories(${Qt6Core_INCLUDE_DIRS} ${Qt6Quick_INCLUDE_DIRS} ${Qt6Qml_INCLUDE_DIRS} ${Qt6Graphs_INCLUDE_DIRS})
    • target_link_libraries(simHardcoreQt6
      PRIVATE Qt6::Core Qt6::Quick Qt6::Qml Qt6::Graphs
      PRIVATE HardcoreQt6 )

    Is there something with my cmake file wrong? I simply changed "Charts" into "Graphs".

    Kind regards,
    Tobias

    1 Reply Last reply
    0
    • T Tobias83 referenced this topic on 28 Mar 2025, 15:08
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 28 Mar 2025, 19:51 last edited by
      #2

      Hi,

      Do you mean you have errors shown from the code model or is your code not working ?

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

      T 1 Reply Last reply 28 Mar 2025, 22:13
      0
      • S SGaist
        28 Mar 2025, 19:51

        Hi,

        Do you mean you have errors shown from the code model or is your code not working ?

        T Offline
        T Offline
        Tobias83
        wrote on 28 Mar 2025, 22:13 last edited by
        #3

        @SGaist The QtCreator says "unknown component". And the runtime error is
        QQmlApplicationEngine failed to load component
        qrc:/qt_qml/Main.qml:53:13: LineSeries is not a type

        Tobias

        J 1 Reply Last reply 31 Mar 2025, 18:58
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 29 Mar 2025, 19:56 last edited by
          #4

          Can you share a minimal compilable example that shows this ?

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

          T 1 Reply Last reply 31 Mar 2025, 16:12
          0
          • S SGaist
            29 Mar 2025, 19:56

            Can you share a minimal compilable example that shows this ?

            T Offline
            T Offline
            Tobias83
            wrote on 31 Mar 2025, 16:12 last edited by
            #5

            @SGaist If I can say this: I think its not a problem with my code. I think there is some software package for QtGraphs missing. In comparism with QtCharts, there is no

            • libQt6GraphsQml6 -> /usr/lib64/
            • qt6-graphsqml-devel -> /usr/include/qt6/QtGraphsQml/

            When I tried to use QtCharts before, the remaining prompts were also not found by QtCreator, before I installed the corresponding devel packages from the repo ...

            Tobias

            S 1 Reply Last reply 31 Mar 2025, 19:07
            0
            • T Tobias83
              28 Mar 2025, 22:13

              @SGaist The QtCreator says "unknown component". And the runtime error is
              QQmlApplicationEngine failed to load component
              qrc:/qt_qml/Main.qml:53:13: LineSeries is not a type

              Tobias

              J Offline
              J Offline
              JoeCFD
              wrote on 31 Mar 2025, 18:58 last edited by JoeCFD
              #6

              @Tobias83 said in QtCreator errors with QtGraphs QML:

              LineSeries

              do you have
              import QtCharts 2.8
              in Main.qml?
              https://doc.qt.io/qt-6/qml-qtcharts-lineseries.html

              T 1 Reply Last reply 3 Apr 2025, 18:48
              0
              • T Tobias83
                31 Mar 2025, 16:12

                @SGaist If I can say this: I think its not a problem with my code. I think there is some software package for QtGraphs missing. In comparism with QtCharts, there is no

                • libQt6GraphsQml6 -> /usr/lib64/
                • qt6-graphsqml-devel -> /usr/include/qt6/QtGraphsQml/

                When I tried to use QtCharts before, the remaining prompts were also not found by QtCreator, before I installed the corresponding devel packages from the repo ...

                Tobias

                S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 31 Mar 2025, 19:07 last edited by
                #7

                @Tobias83 I just realized you have 6.7. Qt Graphs went out of tech preview with 6.8.

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

                T 1 Reply Last reply 3 Apr 2025, 18:53
                0
                • J JoeCFD
                  31 Mar 2025, 18:58

                  @Tobias83 said in QtCreator errors with QtGraphs QML:

                  LineSeries

                  do you have
                  import QtCharts 2.8
                  in Main.qml?
                  https://doc.qt.io/qt-6/qml-qtcharts-lineseries.html

                  T Offline
                  T Offline
                  Tobias83
                  wrote on 3 Apr 2025, 18:48 last edited by
                  #8

                  @JoeCFD I have

                  import QtGraphs 2.12
                  
                  1 Reply Last reply
                  0
                  • S SGaist
                    31 Mar 2025, 19:07

                    @Tobias83 I just realized you have 6.7. Qt Graphs went out of tech preview with 6.8.

                    T Offline
                    T Offline
                    Tobias83
                    wrote on 3 Apr 2025, 18:53 last edited by Tobias83 4 Mar 2025, 18:55
                    #9

                    @SGaist said in QtCreator errors with QtGraphs QML:

                    Graphs went out of tech preview with 6.8

                    What does that mean?

                    On my Computer I have libQt6Core6 6.8.2-3.2. I thought the libs are downward compatible. Should I change

                    find_package(Qt6 6.7 REQUIRED COMPONENTS Qml Core Quick Graphs)
                    

                    With changing in

                    find_package(Qt6 6.8 REQUIRED COMPONENTS Qml Core Quick Graphs)
                    

                    there is no change.

                    Tobias

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 3 Apr 2025, 19:34 last edited by
                      #10

                      How did you install Qt ?
                      Which packages do you have ?

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

                      T 1 Reply Last reply 3 Apr 2025, 20:50
                      0
                      • S SGaist
                        3 Apr 2025, 19:34

                        How did you install Qt ?
                        Which packages do you have ?

                        T Offline
                        T Offline
                        Tobias83
                        wrote on 3 Apr 2025, 20:50 last edited by Tobias83 4 Mar 2025, 20:51
                        #11

                        @SGaist I think its not up to Qt, because QtCharts worked for me. But maybe there is a devel package for qml needed as I wrote ...

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 5 Apr 2025, 19:16 last edited by
                          #12

                          That's why I am asking how you installed Qt.

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

                          T 1 Reply Last reply 6 Apr 2025, 21:31
                          0
                          • S SGaist
                            5 Apr 2025, 19:16

                            That's why I am asking how you installed Qt.

                            T Offline
                            T Offline
                            Tobias83
                            wrote on 6 Apr 2025, 21:31 last edited by
                            #13

                            @SGaist I have installed Qt via system installation, because I have OpenSuse Tumbleweed with KDE Plasma as OS. The packages are updated via the official repositories of OpenSuse. Qt Creator is also installed via the repos.

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 8 Apr 2025, 06:35 last edited by
                              #14

                              Are you able to build and run any of the Qt Graphs examples ?

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

                              T 1 Reply Last reply 8 Apr 2025, 14:23
                              0
                              • S SGaist
                                8 Apr 2025, 06:35

                                Are you able to build and run any of the Qt Graphs examples ?

                                T Offline
                                T Offline
                                Tobias83
                                wrote on 8 Apr 2025, 14:23 last edited by
                                #15

                                @SGaist OK, the hellographs example is working: hellographs on https://code.qt.io
                                I tried to make the same cmakelists.txt, but I don't know, whats the difference between my project and hellographs. There are some warnings in QtCreator like:
                                qabstractaxis.h:17: Warnung: Multiple C++ types called QAbstractAxis found!

                                or

                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:792:EVAL:1: Warnung:
                                Call-Stack:
                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:792:EVAL:1 (qt6_finalize_target)
                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (qt6_import_qml_plugins)
                                /home/tobias/Git-dev/HardCore/CMakeLists.txt:72 (qt_add_qml_module)
                                /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:1241 (qt6_add_qml_module)
                                /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:708 (__qt_internal_setup_policy)
                                /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:4216 (message)

                                or

                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:792:EVAL:1: Warnung: The qml plugin 'qmlplugin' is a dependency of 'simHardcoreQt6', but the
                                link target it defines (Qt6::qmlplugin) does not exist in the current
                                scope. The plugin will not be linked.
                                Call-Stack:
                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:792:EVAL:1 (qt6_finalize_target)
                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
                                /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (qt6_import_qml_plugins)
                                /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:4216 (message)

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 8 Apr 2025, 19:15 last edited by
                                  #16

                                  Are you trying to use both Qt Graphs and Qt Charts at the same time ?

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

                                  T 1 Reply Last reply 29 days ago
                                  0
                                  • S SGaist
                                    8 Apr 2025, 19:15

                                    Are you trying to use both Qt Graphs and Qt Charts at the same time ?

                                    T Offline
                                    T Offline
                                    Tobias83
                                    wrote 29 days ago last edited by
                                    #17

                                    @SGaist If I remove all the QtCharts promts in CMakeLists.txt and Main.qml, the error remains.

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote 29 days ago last edited by
                                      #18

                                      Did you nuke the build folder after these changes to ensure you start from a clean state ?

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

                                      T 1 Reply Last reply 29 days ago
                                      0
                                      • S SGaist
                                        29 days ago

                                        Did you nuke the build folder after these changes to ensure you start from a clean state ?

                                        T Offline
                                        T Offline
                                        Tobias83
                                        wrote 29 days ago last edited by
                                        #19

                                        @SGaist I moved the build directory:

                                        mv build-HardCore-Desktop-Debug/ build-HardCore-Desktop-Debug_old/
                                        

                                        Than I executed cmake file again, but I can't build the project and the project is not structered anymore. There is only a file list at the left site. The error in German language is:
                                        :-1: Fehler: CMake-Konfiguration "Debug wurde nicht gefunden. Verfügbare Konfigurationen: "".
                                        Stellen Sie sicher, dass der Wert der CMAKE_BUILD_TYPE-Variable derselbe wie der des "Build-Typ"-Felds ist.

                                        ... cmake configuration Debug was not found. Ensure that the variable value CMAKE_BUILD_TYPE is the same as that of the Build Type area.

                                        jsulmJ 1 Reply Last reply 29 days ago
                                        0
                                        • T Tobias83
                                          29 days ago

                                          @SGaist I moved the build directory:

                                          mv build-HardCore-Desktop-Debug/ build-HardCore-Desktop-Debug_old/
                                          

                                          Than I executed cmake file again, but I can't build the project and the project is not structered anymore. There is only a file list at the left site. The error in German language is:
                                          :-1: Fehler: CMake-Konfiguration "Debug wurde nicht gefunden. Verfügbare Konfigurationen: "".
                                          Stellen Sie sicher, dass der Wert der CMAKE_BUILD_TYPE-Variable derselbe wie der des "Build-Typ"-Felds ist.

                                          ... cmake configuration Debug was not found. Ensure that the variable value CMAKE_BUILD_TYPE is the same as that of the Build Type area.

                                          jsulmJ Offline
                                          jsulmJ Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote 29 days ago last edited by
                                          #20

                                          @Tobias83 Did you try to build in release mode?

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

                                          T 1 Reply Last reply 28 days ago
                                          0

                                          9/25

                                          3 Apr 2025, 18:53

                                          topic:navigator.unread, 16
                                          • Login

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