title: How to use declare custom typedef for QListIterator
body: <p>I want to use QListIterator, example shown here:  <a href="https://doc.qt.io/archives/qt-4.8/qlistiterator.html" rel="nofollow noreferrer">https://doc.qt.io/archives/qt-4.8/qlistiterator.html</a></p>
  
  <p>I have declared a typedef for the list containing QStringList:</p>
  
  <pre><code>    typedef QList&lt;QStringList&gt; slstStringList;
  </code></pre>
  
  <p>I want to declare a type that is an iterator for the above, I first tried:</p>
  
  <pre><code>    typedef QListIterator&lt;slstStringList&gt; slstIterator;
  </code></pre>
  
  <p>However that didn't work, on looking at the link I posted above I changed it to:</p>
  
  <pre><code>    typedef QListIterator&lt;QStringList&gt; slstIterator;
  </code></pre>
  
  <p>The compiler doesn't like this either, I get:</p>
  
  <pre><code>    error: no matching function for call to 'QListIterator&lt;QStringList&gt;::QListIterator()'
  </code></pre>
  
  <p>What have I done wrong?</p>
  
  <p>Here is an example of where I have tried to use both:</p>
  
  <pre><code>    for( slstIterator it(clsResetCfg::mslstWiFi); it.hasNext(); ) {
          QStringList slstDetails = it.next();
          ...
      }
  </code></pre>
  
  <p>The above works and compiles ok, the error was in a static initialisation of an iterator where I had not specified the static list member, I've changed this now to:</p>
  
  <pre><code>    slstStringList clsResetCfg::mslstWiFi;
      slstIterator clsResetCfg::msitWiFi(clsResetCfg::mslstWiFi);
  </code></pre>
  
  <p>Now all is right in the world :)</p>