QMatrix4x4 matrix; matrix.setToIdentity();
QMatrix4x4 matrix; matrix.rotate(45, QVector3D(0, 1, 0)); matrix.scale(2); matrix.setToIdentity();This example shows how the setToIdentity() method can be used to reset a matrix to its default state. After performing some transformations (rotating and scaling the matrix), we call setToIdentity() to reset it back to the identity matrix. Package library: Qt.