There is a delete button when pressed, which deletes the selected line. If there is more than one row in the table, then there are no problems with deletion, but when the last row remains, it crashes (see photo of the error). Flies to ui.table->removeRow(oldRow); while debugging oldRow = 0 and even tried to insert currentRow () instead of it, but the same error occurs.
//ΠΠ°Ρ
ΠΎΠ΄ΠΈΠΌ ΠΏΠΎΠ·ΠΈΡΠΈΡ ΡΠ΄Π°Π»ΡΠ΅ΠΌΠΎΠΉ Π·Π°ΠΏΠΈΡΠΈ int oldRow = ui.table->currentRow(); //Π£Π΄Π°Π»ΡΠ΅ΠΌ ΡΡΡΠΎΠΊΡ Ρ Π·Π°ΠΏΠΈΡΡΡ ΠΈΠ· Π±ΡΠ°ΡΠ·Π΅ΡΠ° QTableWidgetItem *it; it = ui.table->takeItem(oldRow, 0); it = ui.table->takeItem(oldRow, 1); delete it; ui.table->removeRow(oldRow); tried even like that
//ΠΠ°Ρ
ΠΎΠ΄ΠΈΠΌ ΠΏΠΎΠ·ΠΈΡΠΈΡ ΡΠ΄Π°Π»ΡΠ΅ΠΌΠΎΠΉ Π·Π°ΠΏΠΈΡΠΈ int oldRow = ui.table->currentRow(); //Π£Π΄Π°Π»ΡΠ΅ΠΌ ΡΡΡΠΎΠΊΡ Ρ Π·Π°ΠΏΠΈΡΡΡ ΠΈΠ· Π±ΡΠ°ΡΠ·Π΅ΡΠ° ui.table->removeRow(oldRow); 