My suspicion is that this is due to a round off error. Adjust is a real. In the bounding rectangle calculation you divide this by 2, which is an integer. This causes the result also to be of type integer (thus, causing rounding errors). You can avoid this by dividing by 2.0.

Qt Code:
  1. QRectF Myclass::boundingRect() const
  2. {
  3. qreal adjust = 1.0;
  4. QRectF result(m_rect.topLeft().rx() - adjust/2, m_rect.topLeft().ry() - adjust/2,
  5. m_rect.width() + adjust, m_rect.height() + adjust);
  6.  
  7. return result;
  8. }
To copy to clipboard, switch view to plain text mode 

Should be:

Qt Code:
  1. QRectF Myclass::boundingRect() const
  2. {
  3. qreal adjust = 1.0;
  4. QRectF result(m_rect.topLeft().rx() - adjust/2.0, m_rect.topLeft().ry() - adjust/2.0,
  5. m_rect.width() + adjust, m_rect.height() + adjust);
  6.  
  7. return result;
  8. }
To copy to clipboard, switch view to plain text mode