Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

C++ Backend Charts Demo App

 import Felgo 4.0
 import QtQuick 2.0

 import "charts"

 App {
   id: app

   property bool enable3DView: false
   property var chartData: []

   // load data from C++ at app startup
   Component.onCompleted: cppDataModel.loadData()

   // when new data is sent from C++, parse the JSON and use as chartData in QML
   Connections {
     target: cppDataModel
     // the dataLoaded signal provides a jsonDataString parameter
     function onDataLoaded(jsonDataString) {
       jsonDataString => chartData = JSON.parse(jsonDataString)
     }
   }

   // UI code starts here
   NavigationStack {
     initialPage: AppPage {
       title: "Chart Example"

       BarChart2D {
         id: barChart2D
         visible: !enable3DView
       }

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded