Qtablewidget Throwing Segmentation Fault when reading ROS messages [closed]

asked 2013-09-17 16:29:56 -0500

tan3587 gravatar image

updated 2014-01-28 17:17:59 -0500

ngrennan gravatar image

I am using QtableWidget to populate data collected from ROS messages:

ui->stat->setColumnCount(3); //ui->stat->setRowCount(5); count_row=0;// keep track of table rows ui->stat->setColumnWidth(0,145); ui->stat->setColumnWidth(1,50); ui->stat->setColumnWidth(2,300); QStringlist labels; labels.push_back(" Time"); labels.push_back("Type"); labels.push_back("Message "); ui->stat->setHorizontalHeaderLabels(labels); QTableWidgetItem* text = new QTableWidgetItem(); QTableWidgetItem* msgType = new QTableWidgetItem(); QTableWidgetItem* time = new QTableWidgetItem(); count_row=count_row%5; ui->stat->setItem(count_row,0,time); ui->stat->setItem(count_row,1,msgType); ui->stat->setItem(count_row,2,text); count_row++; for(int i=4;i>=0;i--) ui->stat->showRow(i);

On running the program, I am getting segmentation fault error

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2016-08-08 00:34:55.148712