title: Draw using textured QBrush without translating texture
body: <p>I have made a simple texture of an outlined box and have the following snippet of code which draws a checkerboard pattern:</p>
  
  <pre><code>scene.setSceneRect(0, 0, 1000, 1000);
  ui-&gt;g_view-&gt;setScene(&amp;scene);
  
  QPixmap texture("block.png");
  QBrush brush(texture);
  
  int count = 0;
  for(int x=0; x&lt;1000; x += 50) {
      for(int y=0; y&lt;1000; y += 50) {
          if (count % 2 == 0) {
              scene.addRect(x, y, 50, 50, Qt::NoPen, brush);
          }
          count++;
      }
      // Offset rows by 1
      count++;
  }
  </code></pre>
  
  <p>This works fine:</p>
  
  <p><a href="https://i.stack.imgur.com/RTtkU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RTtkU.png" alt="enter image description here"></a></p>
  
  <p>However, when I modify the code so that the boxes are drawn "off grid":</p>
  
  <pre><code>scene.addRect(x + 5, y + 5, 50, 50, Qt::NoPen, brush);
  </code></pre>
  
  <p>The following output is produced:</p>
  
  <p><a href="https://i.stack.imgur.com/FddcU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FddcU.png" alt="enter image description here"></a></p>
  
  <p>What I expected to happen was that each call to addRect would draw the texture starting from the top corner each time.</p>
  
  <p>However, for some reason qt translates the texture using the location that it is being drawn too, almost like the texture is infinitely tiled in the background and addRect is just cutting away a window.</p>
  
  <p>How can I make drawRect behave as I expected, i.e. no matter what the values of x and y are the texture is always drawn from the top left corner.</p>
  
  <p>Edit: block.png</p>
  
  <p><a href="https://i.stack.imgur.com/eWXMd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eWXMd.png" alt="enter image description here"></a></p>