@Olivier-Ronat Thanks for checking, Olivier. Sorry to detain you to do that when I found it was my own fault. However, I learned some things and got a little better at debugging in Qt Creator.
I found the cause. I had a signal attached to the selectionModel of each row. Here's how I found out (note, I'm a newbie). On my Mac, I got the crash report and clicked a button to see what it was. This showed a callstack. I was able to see that it was complaining about setting text() from on_SelRow, and then I recalled that I had a signal connected on rows. So, I changed my code like so:
I was then able to remove rows without a crash. I just need to remember to add the signal back to the table when I add rows again.
You may also be wondering why I was intercepting a selected row. The reason was because then I could show a box above the table that showed the item detail in an easier to read format than having to scroll horizontally in the table to see all the columns. I was doing it like so:
void MainWindow::on_SelRow(QModelIndex oCurrRow, QModelIndex oPrevRow)
QTableWidget *t = dynamic_cast<QTableWidget *>(QObject::sender()->parent());
int y = oCurrRow.row();
// do something with t (table) and y (row index) variables
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.