Fix incorrect documentation for baseColors

Fixes: QTBUG-121372
Pick-to: 6.6
Change-Id: Id927e5cf2ec8038bb115bee8a9ab3410856fc26c
Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Reviewed-by: Dilek Akcay <dilek.akcay@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
(cherry picked from commit e913ed7030)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tomi Korpipaa 2024-01-22 13:41:13 +02:00 committed by Qt Cherry-pick Bot
parent 1992645ebd
commit 404f15fde5
1 changed files with 5 additions and 3 deletions

View File

@ -21,7 +21,8 @@ int main(int argc, char **argv)
theme->setAmbientLightStrength(0.3f);
theme->setBackgroundColor(QColor(QRgb(0x99ca53)));
theme->setBackgroundEnabled(true);
theme->setBaseColor(QColor(QRgb(0x209fdf)));
QList<QColor> colors = { QColor(QRgb(0x209fdf)) };
theme->setBaseColors(colors);
theme->setColorStyle(Q3DTheme::ColorStyle::Uniform);
theme->setFont(QFont(QStringLiteral("Impact"), 35));
theme->setGridEnabled(true);
@ -40,7 +41,8 @@ int main(int argc, char **argv)
//! [3]
Q3DBars *graph = new Q3DBars();
graph->activeTheme()->setType(Q3DTheme::Theme::PrimaryColors);
graph->activeTheme()->setBaseColor(Qt::red);
QList<QColor> color = { QColor(Qt::red) };
graph->activeTheme()->setBaseColors(color);
graph->activeTheme()->setSingleHighlightColor(Qt::yellow);
//! [3]
}
@ -73,7 +75,7 @@ Surface3D {
ambientLightStrength: 0.5
backgroundColor: "red"
backgroundEnabled: true
baseColor: "blue"
baseColors: ["blue"]
colorStyle: Theme3D.ColorStyle.Uniform
font.family: "Lucida Handwriting"
font.pointSize: 35