Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt Graphs lacking functionalities - Axes range
Forum Updated to NodeBB v4.3 + New Features

Qt Graphs lacking functionalities - Axes range

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
16 Posts 6 Posters 720 Views 2 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.
  • AndyBriceA AndyBrice

    I took a look and I am still quite confused. Are there any example for adding a 2D chart into a C++/QWidget based application?

    cristian-adamC Offline
    cristian-adamC Offline
    cristian-adam
    wrote last edited by
    #7

    @AndyBrice said in Qt Graphs lacking functionalities - Axes range:

    I took a look and I am still quite confused. Are there any example for adding a 2D chart into a C++/QWidget based application?

    Look at https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/charts to browse through the examples. Not all of them start with qml.

    GrecKoG 1 Reply Last reply
    0
    • cristian-adamC cristian-adam

      @AndyBrice said in Qt Graphs lacking functionalities - Axes range:

      I took a look and I am still quite confused. Are there any example for adding a 2D chart into a C++/QWidget based application?

      Look at https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/charts to browse through the examples. Not all of them start with qml.

      GrecKoG Online
      GrecKoG Online
      GrecKo
      Qt Champions 2018
      wrote last edited by
      #8

      @cristian-adam this is for the old module Qt Charts, not Qt Graphs.

      cristian-adamC 1 Reply Last reply
      1
      • B Offline
        B Offline
        Bob64
        wrote last edited by Bob64
        #9

        I just had a closer look at the docs. It seems that 2D Graphs (which I guess is the closest equivalent to the old Qt Charts) are only supported in Qt Quick applications, which is a little surprising to me given my awareness of how much Qt Charts are used in various Qt Widgets applications where I work. The documentation suggests using a QQuickWidget in order to embed this functionality in a Qt Widgets application:

        https://doc.qt.io/qt-6/qtgraphs-2d-quickwidgetgraphs-example.html

        1 Reply Last reply
        0
        • AndyBriceA Offline
          AndyBriceA Offline
          AndyBrice
          wrote last edited by
          #10

          I guess I will be using QtCharts and hoping that it is supported for some time into the forseeable future.

          1 Reply Last reply
          0
          • GrecKoG GrecKo

            @cristian-adam this is for the old module Qt Charts, not Qt Graphs.

            cristian-adamC Offline
            cristian-adamC Offline
            cristian-adam
            wrote last edited by
            #11

            @GrecKo said in Qt Graphs lacking functionalities - Axes range:

            @cristian-adam this is for the old module Qt Charts, not Qt Graphs.

            Sorry. My bad. The Qt Graphs examples at https://code.qt.io/cgit/qt/qtgraphs.git/tree/examples they all have the qml part.

            1 Reply Last reply
            0
            • AndyBriceA Offline
              AndyBriceA Offline
              AndyBrice
              wrote last edited by
              #12

              I had a play with the examples installed in Qt\Examples\Qt-6.10.0\graphs\2d with Qt 6.10 and was a bit underwhelmed.

              quickwidgetgraphs doesn't work, nothing happens when you click on the buttons:

              image.png

              hellographs is QML in a QQuickView .

              cockpit isn't relevant for me.

              Is QtGraphs going to have a C++/widget API similar to QCharts (even if it is just a wrapper over the QML)? Or are people expected to throw away all the QtCharts/widget code and rewrite it all from scratch in QtGraphs/QML?

              JKSHJ 1 Reply Last reply
              0
              • AndyBriceA AndyBrice

                I had a play with the examples installed in Qt\Examples\Qt-6.10.0\graphs\2d with Qt 6.10 and was a bit underwhelmed.

                quickwidgetgraphs doesn't work, nothing happens when you click on the buttons:

                image.png

                hellographs is QML in a QQuickView .

                cockpit isn't relevant for me.

                Is QtGraphs going to have a C++/widget API similar to QCharts (even if it is just a wrapper over the QML)? Or are people expected to throw away all the QtCharts/widget code and rewrite it all from scratch in QtGraphs/QML?

                JKSHJ Offline
                JKSHJ Offline
                JKSH
                Moderators
                wrote last edited by
                #13

                @AndyBrice said in Qt Graphs lacking functionalities - Axes range:

                quickwidgetgraphs doesn't work, nothing happens when you click on the buttons:

                The *.pro file is broken in Qt 6.10.0 (it's fixed for the next releases). Load the CMakeLists.txt and it will work.

                I also suggest downloading the latest version of the example (it's not released yet so get it via git): https://github.com/qt/qtgraphs/tree/dev/examples/graphs/2d/quickwidgetgraphs This shows you how to use Qt Graphs without writing any QML code.

                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                1 Reply Last reply
                1
                • AndyBriceA Offline
                  AndyBriceA Offline
                  AndyBrice
                  wrote last edited by
                  #14

                  I managed to get https://github.com/qt/qtgraphs/tree/dev/examples/graphs/2d/quickwidgetgraphs . It seems somewhat more convoluted than the QtCharts equivalent.

                  Is there going to be a simple migration path from QtCharts to QtGraphs?

                  How long is QtCharts going to be supported?

                  JKSHJ 1 Reply Last reply
                  0
                  • AndyBriceA AndyBrice

                    I managed to get https://github.com/qt/qtgraphs/tree/dev/examples/graphs/2d/quickwidgetgraphs . It seems somewhat more convoluted than the QtCharts equivalent.

                    Is there going to be a simple migration path from QtCharts to QtGraphs?

                    How long is QtCharts going to be supported?

                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote last edited by
                    #15

                    @AndyBrice said in Qt Graphs lacking functionalities - Axes range:

                    Is there going to be a simple migration path from QtCharts to QtGraphs?

                    I ported a simple app (where the data points were written in C++ but displayed in QML/Qt Quick) from Qt Charts to Qt Graphs in Qt 6.10.0. There were some differences in how we set up ChartsView vs. GraphsView, but I did not have to make any changes to my C++ code (QLineSeries).

                    Note: There are differences in the C++ API too, but I hadn't used the parts that changed. Depending on the complexity of your existing code, migration could be simple.

                    I managed to get https://github.com/qt/qtgraphs/tree/dev/examples/graphs/2d/quickwidgetgraphs . It seems somewhat more convoluted than the QtCharts equivalent.

                    Can you please describe which part(s) you found more convoluted, and how it could be simplified?

                    How long is QtCharts going to be supported?

                    Qt Charts has been deprecated, meaning that it will no longer receive new features or minor bugfixes. However, it should continue to be available for the lifetime of Qt 6 (removed from Qt 7).

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    AndyBriceA 1 Reply Last reply
                    1
                    • JKSHJ JKSH

                      @AndyBrice said in Qt Graphs lacking functionalities - Axes range:

                      Is there going to be a simple migration path from QtCharts to QtGraphs?

                      I ported a simple app (where the data points were written in C++ but displayed in QML/Qt Quick) from Qt Charts to Qt Graphs in Qt 6.10.0. There were some differences in how we set up ChartsView vs. GraphsView, but I did not have to make any changes to my C++ code (QLineSeries).

                      Note: There are differences in the C++ API too, but I hadn't used the parts that changed. Depending on the complexity of your existing code, migration could be simple.

                      I managed to get https://github.com/qt/qtgraphs/tree/dev/examples/graphs/2d/quickwidgetgraphs . It seems somewhat more convoluted than the QtCharts equivalent.

                      Can you please describe which part(s) you found more convoluted, and how it could be simplified?

                      How long is QtCharts going to be supported?

                      Qt Charts has been deprecated, meaning that it will no longer receive new features or minor bugfixes. However, it should continue to be available for the lifetime of Qt 6 (removed from Qt 7).

                      AndyBriceA Offline
                      AndyBriceA Offline
                      AndyBrice
                      wrote last edited by AndyBrice
                      #16

                      @JKSH said in Qt Graphs lacking functionalities - Axes range:

                      Depending on the complexity of your existing code, migration could be simple.

                      Ok, thanks.

                      Can you please describe which part(s) you found more convoluted, and how it could be simplified?

                      It seems to have more classes involved. But it is a while since I looked at QtCharts.

                      Qt Charts has been deprecated, meaning that it will no longer receive new features or minor bugfixes. However, it should continue to be available for the lifetime of Qt 6 (removed from Qt 7).

                      Hopefully, it will still be supported in a Qt6Compat module in Qt 7.

                      1 Reply Last reply
                      1

                      • Login

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