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. BoxPlotSeries QML model in C++
Forum Updated to NodeBB v4.3 + New Features

BoxPlotSeries QML model in C++

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 3 Posters 405 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
    Drazz
    wrote on last edited by
    #1

    Hello,

    Looking into Qt Documentation of BoxPlotSeries I see just at the beginning:

    Instantiates: QBoxPlotSeries
    

    So, if I want to feed that QBoxPlotSeries with data, how can I access it from C++?

    ChartView {
            id: boxPlotView
    
            BoxPlotSeries{
                id: boxPlotSeries
    
            }
        }
    
    1 Reply Last reply
    0
    • GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #2

      You would expose your data as a C++ table model and use it with VBoxPlotModelMapper :

      ChartView {
              id: boxPlotView
      
              BoxPlotSeries{
                  VBoxPlotModelMapper {
                      model: myCustomModel // QAbstractItemModel derived implementation
                      firstBoxSetColumn: 0
                      lastBoxSetColumn: 3
                  }
              }
          }
      
      1 Reply Last reply
      2
      • D Offline
        D Offline
        Drazz
        wrote on last edited by
        #3

        Thank you, that made the job!

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Drazz
          wrote on last edited by
          #4
          This post is deleted!
          1 Reply Last reply
          0
          • D Offline
            D Offline
            Dmitrii_A
            wrote on last edited by
            #5

            Does anyone know how to set labels for BoxPlotSeries using VBoxPlotModelMapper? In the documentation the following is written:

            Each box-and-whiskers item contains data starting from row 1. The name of an item is defined by the column header.

            However, it is unclear to me what "column header" refers to in this context. I attempted to implement the headerData method, but it wasn't called. Any insights would be appreciated!

            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