# Vanishing spaces between words inside a QRcode

When the text of a QRcode comes from a \newcommand{\TextInsideQRcode}, the spaces between the words vanish. Is there a way to maintain the spaces between the words ?

 \documentclass[]{article}
\usepackage[]{qrcode}
\begin{document}


\qrcode[]{\TextInsideQRcode}%

\vglue1cm

\qrcode[]{When a similar verbatim text in directly entered into the qrcode command, the spaces between the words remain intact.}%

\end{document}


Please read section "2.3 Special characters" of the documentation for package qrcode. \qrcode reads the argument verbatim except for characters \, {, and } to allow macro expansion. These characters and the other special characters including spaces needs an "escaping" with the backslash, because their catcodes are already assigned at the time of the macro definition. The catcode changes in \qrcode come to late.
\newcommand*{\TextHello}{Hello\ world!}