You invoke the same contract via the to address field using a transaction. You can add data using the data field.
QR codes can be generated for any data. They can get quite large and detailed for larger data sets but we at MyEtherWallet successfully use QR codes to move signed transaction from an offline computer to an online one on the offline transaction tab.
Note: QR codes do have a maximum size. Numeric only: 7,089 characters. Alphanumeric: 4,296 characters. Binary/byte: 2,953 characters (8-bit bytes). You can learn more here.
So, the question comes down to: what information do you want to put in the QR code, and what does the user do?
Here is one solution:
Find platform that accepts parameters for a contract via query strings or another method.
Generate a URI with those parameters for the user and turn it into a QR code.
Invite the user to use the QR code to arrive at that URL and use their account to make the transaction (aka interact with the smart contract)
Let's take an example of how you could do it, right now, using MyEtherWallet, which has the ability to accept to address, amount, data, and gas on the send transaction page.
Let's say you want to have a user send
1 ETH to the address
0x7cB57B5A97eAbe94205C07890BE4c1aD31E486A8 with a
simple text string, and a slight increase in gas to
23000 to cover the cost of the extra data. The URL you would start with would be:
If a user were to go to that tab and unlock their account they would have all that information filled out. Then they just have to generate the signed transaction and send it off. If you wish to test and see what happens when you go to that URL, you can use test priv key of
92aa647439f9300d214f9264141931627082364f4c081a646d72e067e04e0e1b to unlock the wallet and see.
Data can be whatever you want and that is a separate issue that you must deal with. All data must be in hex format. In the above example I used an online ascii to hex converter to send the message "MyEtherWallet is the best!" In this case, the receiving address doesn't do anything with that data. Obviously if the receiving address was a contract, it could be set up to read and do something with it based on the value of that data.