'How to create list of ThemeColor in Theme3D QML type?
Created custom Theme3D for Scatter3D component (QtDataVisualization module) like this:
Theme3D {
id: themeDark
type: Theme3D.ThemeIsabelle
font.pointSize: 20
baseColors: [
"red",
"green",
"blue"
]
}
However got error when running application:
Color is invalid, use ThemeColor
Qt documentation mentions:
baseColors : list<ThemeColor>: The list of base colors to be used for all the objects in the graph, series by series. If there are more series than colors, color list wraps and starts again with the first color in the list.
and no example how to initialize the list properly. How to change baseColors property?
Solution 1:[1]
Solved like this:
baseColors: [
ThemeColor { color: "red" },
ThemeColor { color: "green" },
ThemeColor { color: "blue" }
]
However got another problem:
- st series is black
- nd - is red
- rd - is green
Created QTBUG-101033 bug report for Qt to solve this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
