Guest User

Untitled

a guest
Dec 14th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. void Foo::componentComplete()
  2. {
  3. QObjectList children = this->children();
  4.  
  5. for (int i = 0; i < children.length(); i++)
  6. {
  7. if(QString(children[i]->metaObject()->className()).contains("MyClass"))
  8. {
  9. this->myChildList.append(static_cast<MyClass*>(children[i]));
  10. }
  11. }
  12. }
  13.  
  14. ChartView {
  15. id: chart
  16. title: "Top-5 car brand shares in Finland"
  17. anchors.fill: parent
  18. legend.alignment: Qt.AlignBottom
  19. antialiasing: true
  20.  
  21. PieSeries {
  22. id: pieSeries
  23. PieSlice { label: "Volkswagen"; value: 13.5 }
  24. PieSlice { label: "Toyota"; value: 10.9 }
  25. PieSlice { label: "Ford"; value: 8.6 }
  26. PieSlice { label: "Skoda"; value: 8.2 }
  27. PieSlice { label: "Volvo"; value: 6.8 }
  28. }
  29. }
Add Comment
Please, Sign In to add comment