Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt graph vs Qt chart

Qt graph vs Qt chart

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 5 Posters 1.5k 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.
  • F Offline
    F Offline
    flyyhigh
    wrote on last edited by
    #1

    Hi,

    In my search in the forum, it had been said that the qt chart will be replace by qt graph. But I wonder to know when I should use chart and when I should use graph; what is the differences between these two?

    Cheers,

    Pl45m4P 1 Reply Last reply
    0
    • F flyyhigh

      Hi,

      In my search in the forum, it had been said that the qt chart will be replace by qt graph. But I wonder to know when I should use chart and when I should use graph; what is the differences between these two?

      Cheers,

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @flyyhigh said in Qt graph vs Qt chart:

      But I wonder to know when I should use chart and when I should use graph

      As per documentation, for new projects it's recommended to start with Qt Graphs.
      But there's nothing wrong with using Qt Charts.

      Probably you have to keep an eye on changes.

      what is the differences between these two?

      There should be no difference at some point.
      Qt Graphs will fully replace and even improve the Qt Chart module.

      One major difference is that Charts are rendered using Qt's Graphics View Framework, while Graph elements for both C++ and QML, are rendered using Qt Quick Shapes (QML-based).

      Currently there are some parts and features missing in Qt Graphs, as both modules are in development/maintenance phase:

      • https://doc.qt.io/qt-6/qtgraphs-migration-guide-2d.html#features-missing-in-qt-graphs

      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      JonBJ 1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        In addition to @Pl45m4, the goal of Qt Graphs is to bring performance where Qt Charts cannot due to its core components original design.

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

        1 Reply Last reply
        0
        • F Offline
          F Offline
          flyyhigh
          wrote on last edited by
          #4

          @Pl45m4 and @SGaist
          Thank you for your reply.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SimonSchroeder
            wrote on last edited by
            #5

            If you can (i.e. no feature is missing) use Qt Graphs as Qt Charts will be phased out eventually. At some you'd have to switch.

            Also keep in mind that these modules are not available under the LGPL, but only GPL or commercial license. If you want a more permissive license you can use Qwt (https://qwt.sourceforge.io/) instead.

            1 Reply Last reply
            0
            • Pl45m4P Pl45m4

              @flyyhigh said in Qt graph vs Qt chart:

              But I wonder to know when I should use chart and when I should use graph

              As per documentation, for new projects it's recommended to start with Qt Graphs.
              But there's nothing wrong with using Qt Charts.

              Probably you have to keep an eye on changes.

              what is the differences between these two?

              There should be no difference at some point.
              Qt Graphs will fully replace and even improve the Qt Chart module.

              One major difference is that Charts are rendered using Qt's Graphics View Framework, while Graph elements for both C++ and QML, are rendered using Qt Quick Shapes (QML-based).

              Currently there are some parts and features missing in Qt Graphs, as both modules are in development/maintenance phase:

              • https://doc.qt.io/qt-6/qtgraphs-migration-guide-2d.html#features-missing-in-qt-graphs
              JonBJ Online
              JonBJ Online
              JonB
              wrote on last edited by JonB
              #6

              @Pl45m4 said in Qt graph vs Qt chart:

              One major difference is that Charts are rendered using Qt's Graphics View Framework, while Graph elements for both C++ and QML, are rendered using Qt Quick Shapes (QML-based).

              Just so I understand. I write Qt widgets applications, which (so far as I know) use no QML elements and so do not link with anything QML (right?).

              Occasionally I include some Qt Charts. If I replace with Qt Graphs in future does that mean my widgets application will now use/require/link with QML elements/code?

              S 1 Reply Last reply
              0
              • JonBJ JonB

                @Pl45m4 said in Qt graph vs Qt chart:

                One major difference is that Charts are rendered using Qt's Graphics View Framework, while Graph elements for both C++ and QML, are rendered using Qt Quick Shapes (QML-based).

                Just so I understand. I write Qt widgets applications, which (so far as I know) use no QML elements and so do not link with anything QML (right?).

                Occasionally I include some Qt Charts. If I replace with Qt Graphs in future does that mean my widgets application will now use/require/link with QML elements/code?

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

                @JonB said in Qt graph vs Qt chart:

                If I replace with Qt Graphs in future does that mean my widgets application will now use/require/link with QML elements/code?

                This needs some further investigation. A quick glance tells me that when you add the graphs module it will also add Qt Quick. However, the overview of the modules (https://doc.qt.io/qt-6/qtmodules.html) tells me that QML is a separate module from Quick. So, maybe the truth is in the middle: your widgets application uses/requires/links Quick, but maybe not QML (I just don't know).

                JonBJ 1 Reply Last reply
                0
                • S SimonSchroeder

                  @JonB said in Qt graph vs Qt chart:

                  If I replace with Qt Graphs in future does that mean my widgets application will now use/require/link with QML elements/code?

                  This needs some further investigation. A quick glance tells me that when you add the graphs module it will also add Qt Quick. However, the overview of the modules (https://doc.qt.io/qt-6/qtmodules.html) tells me that QML is a separate module from Quick. So, maybe the truth is in the middle: your widgets application uses/requires/links Quick, but maybe not QML (I just don't know).

                  JonBJ Online
                  JonBJ Online
                  JonB
                  wrote on last edited by
                  #8

                  @SimonSchroeder
                  Thanks. To me "Qt Quick" is sort of the same as "QML", I have never (deliberately) used either. At present when I write pure widgets applications I presume I use neither "Quick" nor "QML", and don't need them installed....

                  Pl45m4P S 2 Replies Last reply
                  0
                  • JonBJ JonB

                    @SimonSchroeder
                    Thanks. To me "Qt Quick" is sort of the same as "QML", I have never (deliberately) used either. At present when I write pure widgets applications I presume I use neither "Quick" nor "QML", and don't need them installed....

                    Pl45m4P Offline
                    Pl45m4P Offline
                    Pl45m4
                    wrote on last edited by Pl45m4
                    #9

                    @JonB said in Qt graph vs Qt chart:

                    To me "Qt Quick" is sort of the same as "QML", I have never (deliberately) used either

                    QML <---> Qt Quick behaves the same as
                    C++ <---> Qt Widgets.

                    QML is the "programming language" whereas Qt Quick is the actual framework.

                    As far as I know there are also 3rd party extensions and libraries other than Qt's Qt Quick written in/with QML

                    I think Qt Graphs will use Qt Quick Items "under the hood". So you are still dealing with a Qt Widget structure and regular C++ classes, but while being rendered on your graph, it will make use of QML/Qt Quick internally


                    If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                    ~E. W. Dijkstra

                    JonBJ 1 Reply Last reply
                    0
                    • Pl45m4P Pl45m4

                      @JonB said in Qt graph vs Qt chart:

                      To me "Qt Quick" is sort of the same as "QML", I have never (deliberately) used either

                      QML <---> Qt Quick behaves the same as
                      C++ <---> Qt Widgets.

                      QML is the "programming language" whereas Qt Quick is the actual framework.

                      As far as I know there are also 3rd party extensions and libraries other than Qt's Qt Quick written in/with QML

                      I think Qt Graphs will use Qt Quick Items "under the hood". So you are still dealing with a Qt Widget structure and regular C++ classes, but while being rendered on your graph, it will make use of QML/Qt Quick internally

                      JonBJ Online
                      JonBJ Online
                      JonB
                      wrote on last edited by
                      #10

                      @Pl45m4 said in Qt graph vs Qt chart:

                      it will make use of QML/Qt Quick internally

                      So that will need installing :( OK.

                      Pl45m4P 1 Reply Last reply
                      0
                      • JonBJ JonB

                        @Pl45m4 said in Qt graph vs Qt chart:

                        it will make use of QML/Qt Quick internally

                        So that will need installing :( OK.

                        Pl45m4P Offline
                        Pl45m4P Offline
                        Pl45m4
                        wrote on last edited by Pl45m4
                        #11

                        @JonB said in Qt graph vs Qt chart:

                        So that will need installing :(

                        There's no evidence in the documentation that you need to install something else other than the Qt Graphs module?!
                        Maybe the required Qt Quick components are included, I don't know?!

                        It's just this?!

                        • https://doc.qt.io/qt-6/qtgraphs-index.html#building-with-cmake

                        We will see when they are done with refactoring both modules.


                        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                        ~E. W. Dijkstra

                        1 Reply Last reply
                        0
                        • JonBJ JonB

                          @SimonSchroeder
                          Thanks. To me "Qt Quick" is sort of the same as "QML", I have never (deliberately) used either. At present when I write pure widgets applications I presume I use neither "Quick" nor "QML", and don't need them installed....

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

                          @JonB said in Qt graph vs Qt chart:

                          Thanks. To me "Qt Quick" is sort of the same as "QML", I have never (deliberately) used either. At present when I write pure widgets applications I presume I use neither "Quick" nor "QML", and don't need them installed....

                          Same here! (Never have used them, don't want them.)

                          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