QR codes used for contact sharing often follow the vCard :
example of vCard :
BEGIN:VCARD
VERSION:3.0
FN:John Doe
TEL:+1234567890
EMAIL:[email protected]
END:VCARD
You just need to implement this code for QR scanning, and it will automatically display the option to add the contact.