.toSize() exists from the times when surfaceSize used to be a QSize. It shouldn't matter in practice though.