title: Unable to setContent in QDomDocument
body: <p>I have been trying to port a function written in Python/Pyside/Qt4.7.4 into C++, the sticking point is in setting the content for the QDomDocument.  In Python 2.6 I can do this:</p>
  
  <pre><code>doc = QtXml.QDomDocument("initData")
  file = QtCore.QFile("initData.xml")
  if not file.open(QtCore.QIODevice.ReadOnly):
     exit()
  if not doc.setContent(file):
     file.close()
     exit()
  </code></pre>
  
  <p>And all is hunky dory (the file exists, can be read by the program, gets parsed, and the resulting DOM Document can be manipulated as I would expect), but in C++ (using Qt Creator 2.3.1, Qt 4.7.4, on OSX). If I try:</p>
  
  <pre><code>QFile *file = new QFile("/Users/UserName/Desktop/ProgramFolder/files/initData.xml");
  file-&gt;open(QIODevice::ReadWrite|QIODevice::Text);
  QDomDocument *doc = new QDomDocument;
  doc-&gt;setContent(file);
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Symbols not found
  file not found
  Collect2 - Id returned exit 1 status
  file not found
  </code></pre>
  
  <p>When I remove lines three and four and replace them with an isOpen debugging statement I get confirmation that the file exists, and that Qt can read it.  Does anyone have any ideas that I can use to debug this?</p>