Use setWorldMatrix() to set the canvas view's world matrix: you must
ensure that the world matrix is invertible. The current world matrix
is retrievable with worldMatrix(), and its inversion is retrievable
with inverseWorldMatrix().

Example:

The following code finds the part of the canvas that is visible in
this view, i.e. the bounding rectangle of the view in canvas coordinates.

Sets the transformation matrix of the QCanvasView to wm. The
matrix must be invertible (i.e. if you create a world matrix that
zooms out by 2 times, then the inverse of this matrix is one that
will zoom in by 2 times).

When you use this, you should note that the performance of the
QCanvasView will decrease considerably.