title: how to search a QString in QVector
body: <p>I have been trying search an id a string saved in QVector like this</p>
  <pre><code>QVector&lt;QString&gt; logMessages;
   
  logMessages.append(&quot;1- Message&quot;);
  logMessages.append(&quot;2- Message&quot;);
  logMessages.append(&quot;3- Message&quot;);
  logMessages.append(&quot;4- Message&quot;);  
  </code></pre>
  <p>I have tried to use the find but it didn't work with me, the IDE doesn't show any error messages, but in the debug windwo the value of &quot; iterator display &quot;not accessible&quot;.</p>
  <p>This is what I have tried so far but, it didn't work with me.</p>
  <pre><code>QVector&lt;QString&gt;::iterator it = std::find(logMessages.begin(), logMessages.end(), &quot;2&quot;);
  if(it != logMessages.end())
  {
      int index = std::distance(logMessages.begin(), it);
  }
  </code></pre>