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. Update Spline series Chart data Continuously using VXYmodelMapper in QML

Update Spline series Chart data Continuously using VXYmodelMapper in QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 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.
  • D Offline
    D Offline
    dhu0504
    wrote on last edited by
    #1

    I am using Qt chart module in QML.
    I set the model data directly by the following code.
    VXYModelMapper{
    id:mapper
    model: customtablemodel
    series: lineone
    xColumn: 0
    yColumn: 1
    Component.onCompleted:
    {
    console.log("loaded VXYModelMapper: xColumn " + mapper.xColumn + " yColumn " + mapper.yColumn)
    }
    }

    I need to update the model data every 5 sec and in C++ and update the graph.

    Please let me know any work around for this.

    Thanks in advance

    1 Reply Last reply
    0
    • 6thC6 Offline
      6thC6 Offline
      6thC
      wrote on last edited by 6thC
      #2

      https://forum.qt.io/topic/85621/qml-lineseries-with-c-vector-data/1

      It can handle very fast updates, we're talking whole series replacements in 14ms (maybe less - 14ms is way too small for me to care to tighten further) using OpenGL series and replace() calls ... I think 5s is easy to achieve - it won't be charts / QXYSeries holding you back anyhow.

      1 Reply Last reply
      1
      • D Offline
        D Offline
        dhu0504
        wrote on last edited by
        #3

        Actually i am using QAbstractTableModel to send the model data from c++ to QML. Also column number is mentioned in the VXYModelMapper. First time the chart is updated. How can i update model data from c++ to QML every 5 sec to change the charts continuously. The data is get from the data base table.

        Please let me know

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dhu0504
          wrote on last edited by
          #4

          how can i update data model in c++ with different data, that will draw spline series graph in QML using VXY model mapper.

          It will be very helpful give some ideas about that.

          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