Is there a way to create a qr code in LaTeX with koma variables as input?
am using the package qrcode and everything works fine and the package is easy to use. However, when I am trying to use a koma variable as the input for the text LaTeX crashes.
This works:
\documentclass{scrlttr2}
\usepackage[final]{qrcode}
\setkomavar{fromemail}{me@it.is}
\newcommand{\texttoconvert}{mailto:me@it.is}
\begin{document}
\begin{letter}{}
\qrcode[height=1.5cm]{\texttoconvert}
\end{letter}
\end{document}
But this does not:
\documentclass{scrlttr2}
\usepackage[final]{qrcode}
\setkomavar{fromemail}{me@it.is}
\newcommand{\texttoconvert}{mailto:\usekomavar{fromemail}}
\begin{document}
\begin{letter}{}
\qrcode[height=1.5cm]{\texttoconvert}
\end{letter}
\end{document}
Why is that? It also does not work to use koma variables directly in qrcode...

