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. Display and Handle 9 Charts efficiently

Display and Handle 9 Charts efficiently

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 300 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.
  • S Offline
    S Offline
    Stronkbert
    wrote on last edited by Stronkbert
    #1

    Hi,
    I had the following question.
    So far I worked a decent amount with Qt Creator and Widgets but now starting with Qt Quick and QML.
    I want to do a GUI with 9 charts and update them alltogether with a new value on a regular time base.
    I saw that Qt Quick offers the "Repeater" object which can make copys of Items, so that one template for an item is created and then the item can displayed for example 9 times with the Repeater.
    Would a similar approach be possible with the ChartView Class so that a template for one chart would be generated and then 9 charts can be created in a grid from that template ?
    My main problem is how every chart could receive an individual id in that case so that each chart can be updated with different values.
    Many Greetings

    JoeCFDJ 1 Reply Last reply
    0
    • S Stronkbert

      Hi,
      I had the following question.
      So far I worked a decent amount with Qt Creator and Widgets but now starting with Qt Quick and QML.
      I want to do a GUI with 9 charts and update them alltogether with a new value on a regular time base.
      I saw that Qt Quick offers the "Repeater" object which can make copys of Items, so that one template for an item is created and then the item can displayed for example 9 times with the Repeater.
      Would a similar approach be possible with the ChartView Class so that a template for one chart would be generated and then 9 charts can be created in a grid from that template ?
      My main problem is how every chart could receive an individual id in that case so that each chart can be updated with different values.
      Many Greetings

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @Stronkbert said in Display and Handle 9 Charts efficiently:

      Repeater

      Column {
          Repeater {
              model: ["id1", "id2", "id3"]
              Text {
                     id:  modelData
                     text: : "Data:" + modelData
              }
          }
      }
      
      1 Reply Last reply
      0
      • S Offline
        S Offline
        Stronkbert
        wrote on last edited by
        #3

        Ok I will try to precise my question:

        Row {
            Repeater {
                model: 3
                Rectangle {
                    width: 100; height: 40
                    border.width: 1
                    color: "yellow"
                }
            }
        }
        

        This is the Repeater Example from the Documentation, it builds 3 rectangles.

        What I want to do is this:

        Row
            {
                Repeater
                {
                    model: 9
                    ChartView
                    {
                         ................
                          ......................
                         ................
                    }
                }
            }
        

        The result should be 9 charts with x and y axis each in the window, but I dont know how exactly it can be done, and all attemtps didn't work.

        If I add the hint of "JoeCFD" it would be rather like:

        Row
            {
                Repeater
                {
                    model: ["id1", "id2", "id3", "id4", "id5", "id6", "id7", "id8", "id9"]
                    ChartView
                    {
                         ................
                          ......................
                         ................
                    }
                }
            }
        

        But also with this method to give the ids it doesnt work. "Doesn't work" means the window remains empty.

        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