Hi the board

Sorry if my english is not fluently ( im just French and im doing my best )

I'm really a newbie about C++ and QT just started it few days ago. Ive create a small progarm to get data from Arduino serial port, i got the data, i can parse the data as i wanted to do
And i even save the data into csv file

Now i have made some code to access a specific row in the file, it works i can display on textEdit, but i need to get a code to get maximum value of this specific row

I try many code but QT debug give me reply line by line and the function std::max_element cant works correctly.... i would like to get output in one line and then execute max_element

Ive been searching everyboard for hours, but i cant solved it alone

Qt Code:
  1. void Dialog::on_pushButton_clicked()
  2. {
  3. {
  4.  
  5.  
  6. QString fichier2= "c:/qt/essaiqt.csv";
  7. QFile file(fichier2);
  8. if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
  9. return;
  10. while (!file.atEnd())
  11.  
  12. {
  13.  
  14. QByteArray line = file.readLine();
  15. QByteArrayList fields {line.split(';')};
  16. QByteArray column2 {(fields [3])};
  17. QDataStream s(column2);
  18. fields[3] = fields [3].simplified();
  19. column2 = column2.simplified();
  20. column2.toDouble();
  21. QVector<double> essai;
  22.  
  23.  
  24. auto valeur = std::max_element(column2.begin(), column2.end());
  25. std::cout << "max "<< valeur;
  26. qDebug() << "x=" << column2;
  27.  
  28. {
  29.  
  30.  
  31. ui->textEdit->append(fields[3]);
  32.  
  33.  
  34. }
  35. }
  36. }
To copy to clipboard, switch view to plain text mode 

and output looks like it output.png

Your help will be highly appreciate