How to set color of QChart background to radial gradient?
Unsolved
General and Desktop
-
I have a basic qchart in qt c++. I want to set the color of the background to a radial gradient, doesn't matter what color. Like this:
I can change the color of background of qchart with this code:
chart->setBackgroundBrush(QBrush(QColor("salmon")));
It is not a radial gradient. How can I set this?
-
@Rozerin-YILDIZ said in How to set color of QChart background to radial gradient?:
I can change the color of background of qchart with this code:
chart->setBackgroundBrush(QBrush(QColor("salmon")));
If you set a plain color, you can't expect to receive any gradient...
Use
QRadialGradient
.