title: Qt drawing a ring / circle with a hole
body: <p>I need to draw a circle with QPainter. When I used drawEllipse function like : </p>
  
  <pre><code>void UserClass::Draw(QPainter &amp;painter) {
  
      painter.save();
      painter.setBrush( GetColor() );
      QPoint centerPosition = GetCenterPosition();
      painter.drawEllipse( centerPosition, m_CircleOuterRadius, m_CircleOuterRadius);
      painter.setBrush(QColor(0, 0, 0, 0));
      painter.drawEllipse( centerPosition, m_CircleInnerRadius, m_CircleInnerRadius);
      painter.restore();  
  }
  </code></pre>
  
  <p>Unfortunately result is not what I desired. I want to have inner circle not be filled. That is why I put alpha value as zero but ofcourse it didn't work. How can I have a circle which is not until a certain radius with qt ?  </p>
  
  <p><a href="https://i.stack.imgur.com/ZezdQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZezdQ.jpg" alt="enter image description here"></a></p>