Suppose $\cos Q = 0.4$ in the diagram below.  What is $QR$?



[asy]
pair P,Q,R;
P = (0,0);
Q = (6,0);
R = (0,6*tan(acos(0.4)));
draw(P--Q--R--P);
draw(rightanglemark(Q,P,R,18));
label("$P$",P,SW);
label("$Q$",Q,SE);
label("$R$",R,N);
label("$12$",Q/2,S);
[/asy]
Since $\cos Q = 0.4$ and $\cos Q = \frac{QP}{QR}=\frac{12}{QR}$, we have $\frac{12}{QR} = 0.4$, so $QR = \frac{12}{0.4} = \boxed{30}$.