A paradox on the deformation of singularities

I don't think it is true that $\mathcal X$ is $\mathbb Q$-Gorenstein. Suppose in fact that $\dim \mathcal X _t=2$ for all $t\in C$ and $\mathcal X \to Z$ is a flipping contraction with exceptional locus contained in the central fiber $\mathcal X _0$, then $K_Z$ is not $\mathbb Q$-Cartier, but if $\mathcal X _0$ is a klt surface, then ${Z_0}$ is also a klt surface and hence $\mathbb Q$-Gorenstein (and even $\mathbb Q$-factorial). See Example 4.3 of https://arxiv.org/pdf/math/9809091.pdf for details and see https://arxiv.org/pdf/0901.0389.pdf for many related results.


Just to add to Hacon's answer. This kind of thing has also been studied quite a bit in the characteristic $p > 0$ side. In fact, it was observed in F-purity and rational singularity by R. Fedder (1983) that $F$-pure singularities don't have this property. $F$-pure was later seen to be the analog of log canonical singularities.

The paper F-Regularity Does Not Deform by A. K. Singh (1999) [arxiv] shows that F-regularity doesn't satisfy this property (F-regularity is the analog of KLT singularities). The singularities there are given by rather explicit equations.