Hi,

I have a problem that I can't find the ini file and it seems that even the default settings are not set.
The declaration:

Qt Code:
  1. QSettings *p_projsettings;
To copy to clipboard, switch view to plain text mode 

After it I expect the File created

Qt Code:
  1. p_projsettings = new QSettings("c:temp\MySoft\DCP_MON_INI.ini", QSettings::IniFormat);
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. defaultvalues();
  2. p_projsettings->sync();
  3. if(p_projsettings->status()==QSettings::NoError)
  4. {
  5. retval=false;
  6. }
  7. else
  8. {
  9. retval=true;
  10. }
  11. qDebug() << "Status ProjSettings:" << retval;
  12. return (retval);
To copy to clipboard, switch view to plain text mode 

The status is alway false

Qt Code:
  1. void INI_FILE::defaultvalues()
  2. {
  3. p_projsettings->value("BAUD","230400");
  4. p_projsettings->value("PORT","COM3");
  5. p_projsettings->value("PARITY","NONE");
  6. p_projsettings->value("DATABIT","8");
  7. p_projsettings->value("STOPBIT","1");
  8. p_projsettings->value("FLOWCONTROL","FLOW_OFF");
  9. p_projsettings->value("TIMEOUT","150");
  10. // qDebug("projsettings BAUD",projsettings->value("BAUD"));
  11. qDebug() << "projsettings BAUD:" << p_projsettings->value("BAUD").toString();
  12. p_projsettings->sync();
  13. }
To copy to clipboard, switch view to plain text mode 

Could anybody please tell me what is wrong?

Thanks!