Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-21329

QTransform::quadToQuad() doesn't work, when passed QRectFs

XMLWordPrintable

    • 48b1af941 (dev), 5ead2a3d6 (6.9), f5000beeb (6.8), 79debe2f2 (tqtc/lts-6.5), f91669320 (tqtc/lts-5.15)

      The following code:
      QTransform result;
      qDebug() << QTransform::quadToQuad(QRectF(0,0,1,1), QRectF(0,0,1,1), result);
      outputs "false".

      The reason is that QPolygonF::QPolygonF(const QRectF&) creates a polygon with 5 points, repeating the first, and quadToQuad only accepts polygons with four points.

      You can work around it by creating the polygons yourself, but that is significantly more verbose.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            srutledg Shawn Rutledge
            bgp2000 Björn Piltz
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes