I think there's a line of code missing...
Your "in" object is a QTextStream, right ?
You have to link it to your file like this
QTextStream in(&file);
This must be done after your "file.open()" test.
EDIT :
OK, you corrected...
You don't need to use a QTextStream by the way, you can do this directly :
QString configFileContent = file.readAll();
Guilugi.
Bookmarks