Sometimes we connect internet to our phones using QR code but we don't know the password. last time, it happened to me. My android phone was connected to the WIFI but when I tried to connect it to my laptop, I didn't know the password.
So, in order to find out the actual password from the QR code, I did the following. There could be other ways easier than this but this worked for me.
First you need to download an application called QR Code scanner from Google Play store, there are many apps for the same purpose, I think others also work. But the one I used is this.
After that open your QR code reader app. If you have the QR code on other device just scan it using your phone. But if you have the photo in the gallery of your phone you can upload it tapping the image icon on the QR Code Reader App.
Finally, if your apps sent your some advertisement just skip those and you will get your password and wifi name.