Hello welcome to the forums.
I am assuming you want this solution for a custom Smart Contract ERC20 token.
There are several approaches, my approach would be…
Set up a QR Scanning website or server that connects to your smart contract via Web3.
When the QR code is scanned, the website/server uses code to do some checks to make sure a legitimate QR code was scanned.
Then the website/server calls a smart contract function using Web3 to either Mint or Transfer tokens to the wallet address of the scanner.
You would need to figure out how to ensure that a legitimate QR code was scanned in order to properly validate a correct call. You don’t want just anyone to be able to call the function and mint/transfer an unlimited amount of tokens. An approach for this would be to use a Controller system, where QR codes get scanned, the Controller Validates, then the function gets called.
You would also need to figure out how to ensure what wallet the scanner has. How does the “scanning” know what wallet the scanner has? When the scan happens, do you ask to connect up to their wallet to get their address? Basic security practices tell me I wouldn’t do that. So when scanning, it should be clear to the user what operation you are doing.