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. Repeater and PieSeries/PieSlices
Qt 6.11 is out! See what's new in the release blog

Repeater and PieSeries/PieSlices

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 821 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.
  • J Offline
    J Offline
    jsavin
    wrote on last edited by
    #1

    Hello guys,
    Long time since I didnt come here. But today I really need your help.
    I have a PieSeries that will hold a chart.
    I need to add PieSlices depending on a QList from my C++ class.

    What I tried to do is to use a Reapeter with my list as model. But it seems that delegates item (PieSlices) are not linked to PieSeries.

    This is what I tried :

    PieSeries {
                    size: 0.9
                    id: pieSeries
                    Repeater {
                              model: controller.list
                              delegate : PieSlice {
                                  label : name_from_list
                                  color: color_from_list
                              }
                          }
                }
    

    That doesnt work.
    Do you have any idea on what could work ? Or why this code does not ?

    Thanks you guys for your help !

    Cya

    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