In order to use QTransform::quadToQuad, I convert two rectangles to QPolygonF.

Qt Code:
  1. void GenericScale::paintGrid(QPainter *painter,
  2. QRectF logicalRect)
  3. {
  4. QPolygonF drawRect(logicalRect);
  5.  
  6. qDebug() << drawRect;
  7. }
To copy to clipboard, switch view to plain text mode 

The resulting QPolygonF has - according to watch window and qDebug output - 5 points:

Qt Code:
  1. QPolygonF(QPointF(0, 1) QPointF(57, 1) QPointF(57, 2) QPointF(0, 2) QPointF(0, 1) )
To copy to clipboard, switch view to plain text mode 

Naturally, quadToQuad fails.

Why would the constructor of QPolygonF taking a QRectF as an argument create a QPolygonF with five instead of four points?