Advertisement
Jgug

on_pushButtonRun_clicked for lr5v3

May 17th, 2013
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. void Window::on_pushButtonRun_clicked()
  2. {
  3.   {
  4.     QStringList qListZeros, qListOnes, qListMax;
  5.     QString qStrOut;
  6.  
  7.     qStrOut.clear();
  8.     qStrOut.append("For string number "+QString::number(currentStringNum+1)+"\n");
  9.     qStrOut.append("the group with maximum length is: ");
  10.  
  11.     qListZeros = qstrSolve.split("1");
  12.     qListOnes  = qstrSolve.split("0");
  13.  
  14.     qListZeros.sort();
  15.     qListOnes.sort();
  16.  
  17.     qListMax.append(qListZeros.last());
  18.     qListMax.append(qListOnes.last());
  19.  
  20.     qListMax.sort();
  21.  
  22.     qStrOut.append(qListMax.last()+"\n");
  23.  
  24.     ui->textEditResults->append(qStrOut);
  25.   }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement