I am using :
Qt Code:
  1. settings.value( "coco", "ERROR" ).toString();
To copy to clipboard, switch view to plain text mode 
this works

Qt Code:
  1. const QString s = "coco";
  2. settings.value( s, "ERROR" ).toString();
To copy to clipboard, switch view to plain text mode 
this insists on returning "ERROR"

Is there a way to pass a variable to settings.value ?

s being a const string