(
        view: QGraphicsView, rect: QRectF
)
return QPolygonF([p1, p2, p3, p4])
Like QGraphicsView.mapFromScene(QRectF) but returning a QPolygonF
    (without rounding).
Like QGraphicsView.mapFromScene(QRectF) but returning a QPolygonF
    (without rounding).
Like QGraphicsView . mapFromScene ( QRectF ) but returning a QPolygonF ( without rounding ) .
def qgraphicsview_map_rect_from_scene(
        view: QGraphicsView, rect: QRectF
) -> QPolygonF:
    """Like QGraphicsView.mapFromScene(QRectF) but returning a QPolygonF
    (without rounding).
    """
    tr = view.viewportTransform()
    p1 = tr.map(rect.topLeft())
    p2 = tr.map(rect.topRight())
    p3 = tr.map(rect.bottomRight())
    p4 = tr.map(rect.bottomLeft())
    return QPolygonF([p1, p2, p3, p4])
def qgraphicsview_map_rect_from_scene ( view : QGraphicsView , rect : QRectF ) -> QPolygonF : tr = view . viewportTransform ( ) p1 = tr . map ( rect . topLeft ( ) ) p2 = tr . map ( rect . topRight ( ) ) p3 = tr . map ( rect . bottomRight ( ) ) p4 = tr . map ( rect . bottomLeft ( ) ) return QPolygonF ( [ p1 , p2 , p3 , p4 ] )