how can i parser the .ini file?
-
@victor-wang
the;
should not at the end offoreach
statement, or it will do nothing and finish theforeach
statement, just likefor
statement.you should write
qDebug()
notqDebug
, you forget the parentheses. -
@victor-wang
the;
should not at the end offoreach
statement, or it will do nothing and finish theforeach
statement, just likefor
statement.you should write
qDebug()
notqDebug
, you forget the parentheses.@Flotisable
Sorry, i got this :)Besides, i got a question.
Can i only read the key which the value is true? -
@Flotisable
Sorry, i got this :)Besides, i got a question.
Can i only read the key which the value is true?@victor-wang
I think you have to write some code to test it, just read the key if it pass the test. -
@victor-wang
I think you have to write some code to test it, just read the key if it pass the test.@Flotisable
Can i put value into array?
If it can, how can i do it? -
@Flotisable
Can i put value into array?
If it can, how can i do it?@victor-wang
I think any data can be put into array, but what exactly you want ? -
@victor-wang
I think any data can be put into array, but what exactly you want ?@Flotisable
It is my code hereI wanna put childkey and values into array.
Then compare them.
But i don't know how to do it.
Please Help! -
@Flotisable
It is my code hereI wanna put childkey and values into array.
Then compare them.
But i don't know how to do it.
Please Help!@victor-wang
if you just want to test if the value is true, I think you can do it in theforeach
statement, likeforeach( const QString &childkey, childkeys ) if( settings.value( childkey ).toString() == "true" ) { // do what you want }