title: Can't write a Qlist to a file using QDataStream
body: <p>I am trying to develop a Qt App using 4.7.3 which involves the writing of a QList to a flie.</p>
  
  <p>My class is:</p>
  
  <pre><code>class Task  
  {  
  public:  
      QString ta, desc;  
      QTime ti;  
      QDate da; 
      int pri, diff;  
      bool ala;  
  };  
  </code></pre>
  
  <p>the corresponding QList is : QList tasks;  </p>
  
  <p>My file is :  </p>
  
  <pre><code>QFile theFile("dataBase");  
  QDataStream stream(&amp;theFile);  
  stream.setVersion(QDataStream::Qt_4_7);
  </code></pre>
  
  <p>to read:  </p>
  
  <pre><code>theFile.open(QIODevice::ReadOnly);  
  stream &gt;&gt; tasks;
  </code></pre>
  
  <p>to write:  </p>
  
  <pre><code>theFile.open(QIODevice::WriteOnly);  
  stream &lt;&lt; tasks;  
  </code></pre>
  
  <p>while compiling on Windows using Qt 4.7.3 and GCC 4.4 toolchain I get the following error:  </p>
  
  <p>c:\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtCore\qstringlist.h:46: In file included from c:/QtSDK/Desktop/Qt/4.7.3/mingw/include/QtCore/qstringlist.h:46,  </p>
  
  <p>c:\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtCore\qdatastream.h:250: error: no match for 'operator>>' in 's >> t'  </p>
  
  <p>c:\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtCore\qdatastream.h:-1: In function 'QDataStream&amp; operator&lt;&lt;(QDataStream&amp;, const QList&amp;) [with T = Task]':  </p>
  
  <p>c:\QtSDK\Desktop\Qt\4.7.3\mingw\include\QtCore\qdatastream.h:263: error: no match for 'operator&lt;&lt;' in 's &lt;&lt; ((const QList*)l)->QList::at with T = Task'  </p>
  
  <p>Although the overload for the &lt;&lt; and >> operators exist, I cant find any reason for these errors.....  </p>
  
  <p>Please Help Anyone, as this is a pretty important app which I have to make<br>
  Thanks in Advance....</p>