Advertisement
Guest User

Untitled

a guest
Mar 25th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. QFile file("config");
  2. if (file.open(QIODevice::ReadOnly)) {
  3. foreach (QString line, file.readAll().split('\n')) {
  4. qDebug() << line.trimmed();
  5. }
  6. }
  7.  
  8. Консоль:
  9. "6.30"
  10. "0.92"
  11. "1111"
  12. "1"
  13. "11.80"
  14. "2222"
  15. "2"
  16. "11.80"
  17. "58.00"
  18. "50.8"
  19.  
  20.  
  21. Или:
  22. QStringList lines = file.readAll().split('\n');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement