From a0b24004297710b0f0c9c476588ab2e04e8ac54b 2012-06-18 07:37:22 From: Tero Ahola Date: 2012-06-18 07:37:22 Subject: [PATCH] Fixed QML ChartView background color property --- diff --git a/plugins/declarative/declarativechart.cpp b/plugins/declarative/declarativechart.cpp index 96e6a14..782280a 100644 --- a/plugins/declarative/declarativechart.cpp +++ b/plugins/declarative/declarativechart.cpp @@ -57,6 +57,7 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! \qmlproperty string ChartView::title The title of the chart, shown on top of the chart. + \sa ChartView::titleColor */ /*! @@ -75,6 +76,27 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE */ /*! + \qmlproperty Legend ChartView::legend + The legend of the chart. Legend lists all the series, pie slices and bar sets added on the chart. +*/ + +/*! + \qmlproperty int ChartView::count + The count of series added to the chart. +*/ + +/*! + \qmlproperty color ChartView::backgroundColor + The color of the chart's background. By default background color is defined by chart theme. + \sa ChartView::theme +*/ + +/*! + \qmlproperty bool ChartView::dropShadowEnabled + The chart's border drop shadow. Set to true to enable drop shadow. +*/ + +/*! \qmlmethod Axis ChartView::axisY(QAbstractSeries *series) The y-axis of the series. This is the same as the default y-axis of the chart, unless you have explicitly defined the series to have a non-default y-axis. @@ -239,7 +261,8 @@ QColor DeclarativeChart::titleColor() void DeclarativeChart::setBackgroundColor(QColor color) { QBrush b = m_chart->backgroundBrush(); - if (color != b.color()) { + if (b.style() != Qt::SolidPattern || color != b.color()) { + b.setStyle(Qt::SolidPattern); b.setColor(color); m_chart->setBackgroundBrush(b); emit backgroundColorChanged();