title: QT application with QList<QString> function "append"
body: <p>I'm trying to return a list of matches returned from a QRegularExpression to a QList with this code below:</p>
  
  <pre><code>QList&lt;QString&gt; list();
  QString str ("something by the way");
  QRegularExpression reA("pattern");
  QRegularExpressionMatchIterator i = reA.globalMatch(str);
  
  while (i.hasNext()) {
      QRegularExpressionMatch match = i.next();
      if (match.hasMatch()) {
          list.append(match.captured(0));
      }
  }
  
  return list;
  </code></pre>
  
  <p>...But it shows me this errors:</p>
  
  <pre><code>/home/path/.../file:line# error: request for member 'append' in 'list', which is of non-class type 'QList&lt;QString&gt;()'
           list.append(match.captured(0));
  
  /home/path/.../file:line#: error: could not convert 'list' from 'QList&lt;QString&gt; (*)()' to 'QList&lt;QString&gt;'
   return list;
  </code></pre>
  
  <p>How can i get it working, I've tried to cast into many types.</p>