Advertisement
Guest User

Untitled

a guest
Apr 26th, 2020
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. if(csvModel->rowCount() < 40){
  2. nulls.append("0;0");
  3. while(csvModel->rowCount() < 40){
  4. QList<QStandardItem*> nullsList;
  5. for (QString item : nulls.split(";")) {
  6. nullsList.append(new QStandardItem(item));
  7. }
  8. csvModel->insertRow(csvModel->rowCount(), nullsList);
  9. }
  10. } else if (csvModel->rowCount() > 40){
  11. int rows = csvModel->rowCount() - 40;
  12. for (int i = 40, j = 0; j < rows; j++, i++) {
  13. csvModel->removeRow(i);
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement