Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(csvModel->rowCount() < 40){
- nulls.append("0;0");
- while(csvModel->rowCount() < 40){
- QList<QStandardItem*> nullsList;
- for (QString item : nulls.split(";")) {
- nullsList.append(new QStandardItem(item));
- }
- csvModel->insertRow(csvModel->rowCount(), nullsList);
- }
- } else if (csvModel->rowCount() > 40){
- int rows = csvModel->rowCount() - 40;
- for (int i = 40, j = 0; j < rows; j++, i++) {
- csvModel->removeRow(i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement