title: How do I read specific lines from a txt file- Qt?
body: <p>I am making a program that reads a txt file. I want to read some specific lines from a file and add them to ComboBox. (in my case would be line number: 1,6,11,16...)</p>
  
  <p>I have only this that reads all the lines.</p>
  
  <pre><code> if(file.open (QIODevice::ReadOnly | QIODevice::Text))
  {
      while(!stream.atEnd())
      {
          line = stream.readLine ();
          if(!line.isNull ())
          {
              ui-&gt;ServersNames-&gt;addItem (line);
          }
       }
   }
      stream.flush ();
      file.close ();
  </code></pre>