I have a QDomDocument called doc and I need to make a QStringList of each of its top-level children. So far I have this:
Qt Code:
  1. QDomNodeList nodes = doc.childNodes();
  2. for(int i = 0; i < nodes.size(); i++)
  3. {
  4. QDomText text = nodes.at(i).toText();
  5. //do something here...
  6. }
To copy to clipboard, switch view to plain text mode 

However, I cannot find any way to convert this to a QString. This is my first time ever working with The QDom* classes, so I'm pretty confused, and going by the docs there doesn't seem like much can be done with QDomText. Can anyone please offer some advice? Thanks in advance!