#include <QSettings>
读取内容
QSettings config(QCoreApplication::applicationDirPath()+"\\"+ "config.ini",QSettings::IniFormat);
QString str=config.value("/debugWidget/state1").toString();
修改内容
QSettings config(QCoreApplication::applicationDirPath()+"\\"+ "config.ini",QSettings::IniFormat);
config.setValue("/debugWidget/state2",arg1);