title: Changing QCheckBox indicator rectangle color
body: <p>I'm trying to change only the color of <code>QCheckBox</code> indicator rectangle.</p>
  
  <p>Currently I succeed to draw the right and the bottom line of the rectangle.
  Probably I'm doing something wrong here.</p>
  
  <p>Here is my code:</p>
  
  <p>CheckBoxWidget.cpp</p>
  
  <pre><code>CheckBoxWidget::CheckBoxWidget(QObject *poParent)
      : QItemDelegate(poParent)
  {
  }
  
  void CheckBoxWidget::drawCheck( QPainter *painter,
                                  const QStyleOptionViewItem &amp;option,
                                  const QRect &amp; rect,
                                  Qt::CheckState state) const
  {
      QRect oCheckBoxRect =
              QApplication::style()-&gt;subElementRect( QStyle::SE_CheckBoxIndicator, &amp;option);
  
      painter-&gt;setPen(Qt::white);
      painter-&gt;drawRect(oCheckBoxRect);
  
      QItemDelegate::drawCheck(painter, option, oCheckBoxRect, state);
  }
  </code></pre>
  
  <p>CheckBoxWidget.h</p>
  
  <pre><code>class CheckBoxWidget : public QItemDelegate
  {
      Q_OBJECT
  
  public:
      CheckBoxWidget(QObject *poParent = 0);
      virtual ~CheckBoxWidget();
  
  protected:
      virtual void drawCheck( QPainter *painter,
                              const QStyleOptionViewItem &amp;option,
                              const QRect &amp;,
                              Qt::CheckState state) const;
  };
  </code></pre>
  
  <p>Any suggestions ?</p>