Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int line_counter=1;
- if(file.open (QIODevice::ReadOnly | QIODevice::Text))
- {
- while(!stream.atEnd())
- {
- line = stream.readLine ();
- if(!line.isNull ())
- {
- if((line_counter%5)==1)
- ui->comboBox->addItem (line);
- line_counter++;
- }
- }
- }
- stream.flush ();
- file.close ();
- void Servers::on_pushButton_clicked()
- if(file.open (QIODevice::ReadOnly | QIODevice::Text))
- ui->textBrowser->setText(stream.readAll());
- stream.flush ();
- file.close ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement