https://blog.csdn.net/liang19890820/article/details/50513695

QSettings settings(“./test.ini”, QSettings::IniFormat);
settings.setIniCodec(QTextCodec::codecForName("UTF-8"));

settings.setValue("editor/wrapMargin", 68);

int margin = settings.value("editor/wrapMargin", 80).toInt();

  • contains() 判断一个指定的键是否存在
  • remove() 删除相关的键
  • allKeys() 获取所有键
  • clear() 删除所有键
05-02 06:01