title: Non-pixelized rounded corner for top-level window
body: <p>I want to set rounded corners on a QDialog. Since it is a top-level window, border-radius doesn't work, so I've to do this :</p>
  
  <pre><code>QRegion EnterPinDialog::roundedRect(const QRect&amp; rect, int r)
  {
      QRegion region;
  
      // middle and borders
      region += rect.adjusted(r, 0, -r, 0);
      region += rect.adjusted(0, r, 0, -r);
  
      // top left
      QRect corner(rect.topLeft(), QSize(r*2, r*2));
      region += QRegion(corner, QRegion::Ellipse);
  
      // top right
      corner.moveTopRight(rect.topRight());
      region += QRegion(corner, QRegion::Ellipse);
  
      // bottom left
      corner.moveBottomLeft(rect.bottomLeft());
      region += QRegion(corner, QRegion::Ellipse);
  
      // bottom right
      corner.moveBottomRight(rect.bottomRight());
      region += QRegion(corner, QRegion::Ellipse);
  
      return region;
  }
  </code></pre>
  
  <p>and I call it this way :</p>
  
  <pre><code>this-&gt;setMask(roundedRect(this-&gt;rect(), 8));
  </code></pre>
  
  <p>It works, but the problem is that corners are pixelized.</p>
  
  <p>Is there a way to get it without having these pixelized corners ? If yes, how ?</p>