QTableWidget 행 삭제를 해보았습니다 ^^
시간될 때 선택해서 행 삭제하는 방법과 모두 삭제하는 방법 찾아보면서 다시 게시 하겠습니다.
void userinformationwindow::on_button_user_delete_clicked()
{
// 행 삭제 (현재는 한개씩만)
QModelIndexList indexes = ui->tableWidget->selectionModel()->selectedRows();
for(int i = indexes.count()-1; i>=0; i--)
{
ui->tableWidget->removeRow(indexes.at(i).row());
}
}
'QT' 카테고리의 다른 글
(QT) 배운 것 정리 중 (0) | 2020.09.17 |
---|---|
(QT) QPixmap, QLabel, QPainter override Images (0) | 2020.09.07 |
(QT) QMovie 크기 조절 (resize,size,setScaledSize) (0) | 2020.08.13 |
(QT) RadioButton (0) | 2020.08.13 |
(QT) QTablewidget export to csv (0) | 2020.08.13 |