For the latter I have a patch somewhere - not for QR decoding, but a decoded QR code text can be understood by the Settings app.
An external app will have to do the decoding.
Maybe the other way around can also be done without adding a QR endoder/decoder to the Settings app: make it generate the correct string and send that via the Share API to an encoding app.
See also:
- Connecting to WIFI by scanning QR code
- CodeReader: Cannot use WIFI-Code (not supported)
- WiFi sharing page in Settings improvements
My patch is here, but I haven’t used or tested it in a while: