title: Qt QPainter moire effect on small render targets
body: <p>I am drawing using <code>QPainter</code> a very complex vector image (a PCB board, to be precise) using only one color - <code>Qt::black</code>. The problem is that the input file has tons of horizontal rectangles as background (which are located just next to each other and in case of small render target can be less than a pixel wide) and due to it I get either a gray color (where I should get black) or a moire effect on small render sizes. Below three different sizes are shown; when I render on a big target (last one), using large scaling, everything is okay - but on smaller targets the unwanted effect is seen clearly. How can I avoid it? Turning anti-aliasing on does not fix the problem, it is only making the moire more &quot;blurish&quot;.</p>
  <p><a href="https://i.stack.imgur.com/00tt7.png" rel="nofollow noreferrer" title="Smallest size"><img src="https://i.stack.imgur.com/00tt7.png" alt="Smallest size" title="Smallest size" /></a><a href="https://i.stack.imgur.com/1YfOz.png" rel="nofollow noreferrer" title="Small size"><img src="https://i.stack.imgur.com/1YfOz.png" alt="Small size" title="Small size" /></a><a href="https://i.stack.imgur.com/AAMlj.png" rel="nofollow noreferrer" title="Big size"><img src="https://i.stack.imgur.com/AAMlj.png" alt="Big size" title="Big size" /></a></p>