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.
  • 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 9 Apr 2025, 14:06
      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 on 9 Apr 2025, 14:06 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 on 9 Apr 2025, 17:59 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 9 Apr 2025, 19:24
          0
          • S SGaist
            9 Apr 2025, 17:59

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

            T Offline
            T Offline
            Tobias83
            wrote on 9 Apr 2025, 19:24 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.

            J 1 Reply Last reply 30 days ago
            0
            • T Tobias83
              9 Apr 2025, 19:24

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

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote 30 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 29 days ago
              0
              • J jsulm
                30 days ago

                @Tobias83 Did you try to build in release mode?

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

                @jsulm In release mode, there is also the error unknown component for the QtGraphs prompts.

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

                  Even if it was already done once:

                  • Exit Qt Creator
                  • Delete the CMakeLists.txt.user file from your sources
                  • Nuke all build folders
                  • Start Qt Creator and reconfigure your project

                  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 26 days ago
                  1
                  • S SGaist
                    29 days ago

                    Even if it was already done once:

                    • Exit Qt Creator
                    • Delete the CMakeLists.txt.user file from your sources
                    • Nuke all build folders
                    • Start Qt Creator and reconfigure your project
                    T Offline
                    T Offline
                    Tobias83
                    wrote 26 days ago last edited by
                    #23

                    @SGaist OK, I did so and there is no change: unknown component )-:

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

                      Since you wrote that the example is building successfully, what about copying it and the gradually replace its content with the one from your project ?

                      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 22 days ago
                      0
                      • S SGaist
                        26 days ago

                        Since you wrote that the example is building successfully, what about copying it and the gradually replace its content with the one from your project ?

                        T Offline
                        T Offline
                        Tobias83
                        wrote 22 days ago last edited by
                        #25

                        @SGaist OK, I coppied the main.qml file from the hellographs example to my project. And the GraphsView prompt was recognized. I found out, what the problem with my Main.qml was. I had to change the import commands:
                        instead of

                        import QtGraphs 2.12
                        

                        change to

                        import QtGraphs
                        

                        helped (-:

                        Thank you very much!!!

                        But, I have still a question: How can I use the XYModelMapper? Is there a good example? The usage differs to QtCharts, specially xSection : qsizetype ...

                        Tobias

                        1 Reply Last reply
                        0
                        • T Tobias83 has marked this topic as solved 10 days ago

                        24/25

                        13 Apr 2025, 18:30

                        • Login

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