See this add-on on the kodi.tv showcase
This module uses image libraries, Python Imaging Library (PIL) by default, to generate QR Codes.