Hi,
Qt Code:
  1. settings = new QSettings("product1.xml", XmlFormat);
  2. settings.setValue("settings1",<value>)
  3. // at this point the changes are unsaved! So your second process couldn't delete anything.
  4. // call settings.sync(); explicit.
  5. sleep(20);
  6. settings.setValue("settings2", <value2>)
  7. settings.sync();
To copy to clipboard, switch view to plain text mode 
Furthermore it is normally usual to create a QSettings object on the stack whenever it is needed. Thus it gets destroyed after the scope and calls sync automatically.