title: Qt5 QPainter aliased drawing rules
body: <p>I am a newcomer to Qt and I am trying to do some <code>QPainter</code> drawing with the following test code:</p>
  
  <pre><code>QPixmap pixmap(20, 20);
  pixmap.fill(Qt::white);
  QPainter painter(&amp;pixmap);
  
  // Draw a rectangle (works fine in both Qt4 and Qt5)
  painter.setPen(Qt::blue);
  painter.drawLine(0, 0, 10, 0);
  painter.drawLine(0, 0, 0, 10);
  painter.drawLine(10, 0, 10, 10);
  painter.drawLine(0, 10, 10, 10);
  
  // Draw an example line from official docs (broken in Qt5)
  painter.setPen(Qt::darkGreen);
  painter.drawLine(2, 7, 6, 1);
  
  // Draw an X (broken in Qt5)
  painter.drawLine(13, 13, 18, 18);
  painter.drawLine(13, 18, 18, 13);
  </code></pre>
  
  <p>Somehow, Qt4 (4.8.4) and Qt5 (5.0.1, 5.0.2) give me completely different <a href="http://www.kirinyale.net/files/tmp/qpainter.png" rel="nofollow">results</a>.</p>
  
  <p>It does not look like Qt5 follows the <a href="http://qt-project.org/doc/qt-5.0/qtgui/coordsys.html#aliased-painting" rel="nofollow">rules described in its own official docs</a>. However, there is a new <code>QPainter::Qt4CompatiblePainting</code> render hint. If I set it, it indeed gives me the same result as in Qt4.</p>
  
  <p>So my questions are:</p>
  
  <ul>
  <li>What are the new painting rules actually?</li>
  <li>Where is the documentation for these new rules?</li>
  <li>Why the "X" on the bottom right of my image is not symmetric in Qt5?</li>
  </ul>