##// END OF EJS Templates
Fixed setting the legend (background) color
Tero Ahola -
r1472:832ac8fb4556
parent child
Show More
@@ -103,11 +103,12 QTCOMMERCIALCHART_BEGIN_NAMESPACE
103
103
104 /*!
104 /*!
105 \property QLegend::color
105 \property QLegend::color
106 The color of the legend, i.e. the background color.
106 The color of the legend, i.e. the background (brush) color. Note that if you change the color
107 of the legend, the style of the legend brush is set to Qt::SolidPattern.
107 */
108 */
108 /*!
109 /*!
109 \qmlproperty color Legend::color
110 \qmlproperty color Legend::color
110 The color of the legend, i.e. the background color.
111 The color of the legend, i.e. the background (brush) color.
111 */
112 */
112
113
113 /*!
114 /*!
@@ -217,7 +218,8 QBrush QLegend::brush() const
217 void QLegend::setColor(QColor color)
218 void QLegend::setColor(QColor color)
218 {
219 {
219 QBrush b = d_ptr->m_brush;
220 QBrush b = d_ptr->m_brush;
220 if (b.color() != color) {
221 if (b.style() != Qt::SolidPattern || b.color() != color) {
222 b.setStyle(Qt::SolidPattern);
221 b.setColor(color);
223 b.setColor(color);
222 setBrush(b);
224 setBrush(b);
223 emit colorChanged(color);
225 emit colorChanged(color);
General Comments 0
You need to be logged in to leave comments. Login now