Look at the last QR entry in the accepted answer of this stack overflow question, hopefully you can see what you need here. There is also further useful general info here.
Here is a quick code snippet using the lv_qr library here for a WPA network called OrionsBelt with password Pass1:
const char * data = "WIFI:T:WPA;S:OrionsBelt;P:Pass1;;";
/*Create a QR code*/
lv_obj_t * qr = lv_qrcode_create(lv_scr_act(), 200, lv_color_hex3(0x000), lv_color_hex3(0xfff));
/*Set data*/
lv_qrcode_update(qr, data, strlen(data));