In order to use QTransform::quadToQuad, I convert two rectangles to QPolygonF.
void GenericScale
::paintGrid(QPainter *painter,
{
qDebug() << drawRect;
}
void GenericScale::paintGrid(QPainter *painter,
QRectF logicalRect)
{
QPolygonF drawRect(logicalRect);
qDebug() << drawRect;
}
To copy to clipboard, switch view to plain text mode
The resulting QPolygonF has - according to watch window and qDebug output - 5 points:
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?
Bookmarks