If you always use form "string - string" You can read text line by line like this:

Qt Code:
  1. QFile myFile("path");
  2.  
  3. if(myFile.open(QIODevice::ReadOnly))
  4. {
  5. while(!myFile.atEnd())
  6. {
  7. QString line=myFile.readLine();
  8. QStringList array=line.split(" - ");
  9. //now array[0] is everything before " - " and array[1] is everything after it
  10. }
  11. }
To copy to clipboard, switch view to plain text mode