What do you mean by a .cfg file? Some specific format or just a config file in spite of format? Have you taken look at QSettings?