title: How can I convert a QString of numbers to an array of int?
body: <p>I have a <code>QString</code> containing a series of numbers for example</p>
  
  <pre><code>QString path = "11100332001 234 554 9394";
  </code></pre>
  
  <p>I want to iterate over the variable length string</p>
  
  <pre><code>for (int i=0; i&lt;path.length(); i++){
  
  }
  </code></pre>
  
  <p>and be able to acces each number as an <code>int</code> individually.</p>
  
  <p>I haven't been able to do so however. <strong>Question</strong>: How can I convert a <code>QString</code> of numbers to an array of <code>int</code>?</p>
  
  <p>I know I can convert the <code>QString</code> to an <code>int</code> using <code>path.toInt()</code> but that doesn't help me.</p>
  
  <p>When trying to convert it to a char first I get an error: <code>cannot convert 'const QChar to char'</code>.</p>
  
  <pre><code>for (int i=0; i&lt;path.length(); i++){
          char c = path.at(i);
          int j = atoi(&amp;c);
          //player-&gt;movePlayer(direction);
      }
  </code></pre>