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. Realtime Chart: QML or C++ ? need advice!
Forum Updated to NodeBB v4.3 + New Features

Realtime Chart: QML or C++ ? need advice!

Scheduled Pinned Locked Moved Solved QML and Qt Quick
9 Posts 5 Posters 2.9k Views 3 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.
  • M Offline
    M Offline
    MAthias_Va
    wrote on last edited by
    #1

    I want to plot a real time chart, and add some features to it like save the data, change scale, zoom and change colors, I have two options to follow either QML based like: https://doc.qt.io/qt-5/qtcharts-qmloscilloscope-example.html

    or C++ based like: https://doc.qt.io/qt-5.11/qtcharts-dynamicspline-example.html

    I am confused which one should I follow?

    Gojir4G 1 Reply Last reply
    1
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by kuzulis
      #2

      Don't use QtCharts at all for realtime, it is a bad idea. If you need to do it in QML, then I can say, that there are a bad news. You need to create an own implementation (based on QSGNodes) from scratch (AFAIK), or to use e.g. this.

      But if you need in QtWidgets, then a best option (IMHO) - it is to use the Qwt library.

      PS: QtCharts is ugly, slow, eats the memory, loads the CPU and etc. It can be used only for a static charts. I don't understand why it has been released at all (even worse under GPLv3). I'm personally don't recomment to use it, unfortuanelly.

      M 1 Reply Last reply
      4
      • M Offline
        M Offline
        MAthias_Va
        wrote on last edited by
        #3

        Thanks for the advice

        1 Reply Last reply
        0
        • K kuzulis

          Don't use QtCharts at all for realtime, it is a bad idea. If you need to do it in QML, then I can say, that there are a bad news. You need to create an own implementation (based on QSGNodes) from scratch (AFAIK), or to use e.g. this.

          But if you need in QtWidgets, then a best option (IMHO) - it is to use the Qwt library.

          PS: QtCharts is ugly, slow, eats the memory, loads the CPU and etc. It can be used only for a static charts. I don't understand why it has been released at all (even worse under GPLv3). I'm personally don't recomment to use it, unfortuanelly.

          M Offline
          M Offline
          milan
          wrote on last edited by
          #4

          hello @kuzulis @MAthias_Va. I am also facing exactly same problem. I tried to run the qtquickplot, but it cannot be run. Have you any success working with it?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MAthias_Va
            wrote on last edited by
            #5

            @kuzulis yes I just test it also, and it looks not working, Can you have a look on it!

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kuzulis
              Qt Champions 2020
              wrote on last edited by
              #6

              I did not tried qtquickplot. You can look on this blog. Or try to find another "charts library"... Or to create an own...

              PS: I just pointed out that QtCharts is not a best choose. But I don't know other alternatives in QML.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MAthias_Va
                wrote on last edited by
                #7

                ok thanks again @kuzulis

                1 Reply Last reply
                0
                • M MAthias_Va

                  I want to plot a real time chart, and add some features to it like save the data, change scale, zoom and change colors, I have two options to follow either QML based like: https://doc.qt.io/qt-5/qtcharts-qmloscilloscope-example.html

                  or C++ based like: https://doc.qt.io/qt-5.11/qtcharts-dynamicspline-example.html

                  I am confused which one should I follow?

                  Gojir4G Offline
                  Gojir4G Offline
                  Gojir4
                  wrote on last edited by
                  #8

                  @MAthias_Va Hi,

                  Both C++ and QML solution are the same, QML is based on the C++ backend. So you can use the one which is best for you.

                  1 Reply Last reply
                  2
                  • A Offline
                    A Offline
                    asterixxx
                    wrote on last edited by
                    #9

                    https://www.youtube.com/watch?v=lXXUxy5Opds&t=1s

                    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