Save permanent settings on QT Web App

I was thinking of using Qsettings to save a user's username, however, i can't seem to be able to find how to do that. Can someone give me an example how to define my own variable such as QString username and store it permanently(won't be deleted after the app is closed) . If not , i'm open to other suggestions on how to go about doing this.

Also, do i need to use a special file format or can i just anything like txt? I'm really confused because there's not documentation on how the settings are saved? Do i need to create a file to store the settings? Where do i create this file to store the settings?

@GCDX
If you are going to use QSettings, the links we have asked you to read answer all the questions: Qt deals with the format, the filename & the location, you don't create or do anything (other than @Prince_0912 's skeleton code).

to me it seems "odd/inefficient" to be creating one specifying your organization & project names each time, as these never vary. I would either take the doc's suggestion of:

If you use QSettings from many places in your application, you might want to specify the organization name and the application name using QCoreApplication::setOrganizationName() and QCoreApplication::setApplicationName(), and then use the default QSettings constructor

or I would create one & only one QSettings in your app and re-use that each time.