.................QStringList chlam; chlam << "Барановский" << "Шмаковка" << "Тавричанка" << "Лесозаводск" << "Партизанск" << "Раздол" << "Зарубино" << "Ванино" << "Лозовый" << "Барабаш" << "Спасск" << "Новый" << "Таиланд" << "Таврич" << "Надежд"; int col_cleaner = listTable->currentColumn(); switch ( col_cleaner ) { case 1: foreach (QString str_chlam, chlam) { for ( int j = 0; j < listTable->rowCount(); ++j ) { QString m_colcleaner = listTable->item(j, col_cleaner)->text(); if (m_colcleaner.contains(str_chlam)) listTable->removeRow(j); } } break;...............................
...........................for ( int j = 0; j < listTable->rowCount(); ++j ) { foreach (QString str_chlam, chlam) { QString m_colcleaner = listTable->item(j, col_cleaner)->text(); if (m_colcleaner.contains(str_chlam)) { listTable->removeRow(j); break; } } }......................
for ( int j = 0; j < listTable->rowCount(); ++j ) { foreach (QString str_chlam, chlam) { QString m_colcleaner = listTable->item(j, col_cleaner)->text(); if (m_colcleaner.contains(str_chlam)) { listTable->removeRow(j); j--; break; } } }
for ( int j = 0; j < listTable->rowCount(); ++j ) { QString m_colcleaner = listTable->item(j, col_cleaner)->text(); foreach (QString str_chlam, chlam) { if (m_colcleaner.contains(str_chlam)) { listTable->removeRow(j); j--; break; } } }
...................................................... int col_cleaner = listTable->currentColumn(); for ( int j = 0; j < listTable->rowCount(); ++j ) { foreach (QString str_chlam, chlam) { QList<QTableWidgetItem *> finding = listTable->findItems( str_chlam, Qt::MatchContains); QTableWidgetItem * item = listTable->item( j, col_cleaner ); foreach (item, finding) { int del_row = listTable->row(item); listTable->removeRow(del_row); } } }.....................................