Hello fellow QT devs.

Here goes my problem:

I have QStringList which contains strings of registry paths
i.e.
\Profile Name\Info\Name
\Profile Name\Info\Lenght
\Profile Name\Size\Width
\Profile Name\Size\Height
and so on..

I need to get values from those paths
Qt Code:
  1. ...
  2. QSettings settings;
  3. QStringList keys = settings.allKeys();
  4.  
  5. settings.beginReadArray("Profile Name");
  6.  
  7. for(int i = 0; i < keys.size(); i++)
  8. {
  9. QString key = keys.at(i);
  10. QVariant value = settings.value(key, QVariant::Invalid);
  11. ...
  12. }
  13. ...
To copy to clipboard, switch view to plain text mode 

That's the code I'm trying to use. value() does not return the proper value(no value returned at all!).How can I get the value-function to return the value of that specific key?

Your help is appreciated.


- Eeli Reilin