Use QPointF (and similar types) instead of QPoint in graphics layer.