This workflow is not my job. I just found it in Github and want to share it because it helps.
Here is the project:
https://github.com/cj1128/alfred-qrcode-workflow
Generate QR Code
Type qr [text] to generate QR code, this has a 800ms delay.
Press Cmd+Y to preview the QR Code
Press Enter to open QR Code in Preview
Scan QR Code
Use zbar-with-gbk to do the parsing.
Select the target QR Code image, press Cmd + Alt + \,select Scan QR Code in the popup file actions.
Once you get the result, you can
Press Cmd + L to preview in large text
Press Enter to copy to the clipboard