QTableWidgetItem *item[20];
while(i<20)
{
for(col = 0;col < 2;col++)
{
item
= ui->table->item(row,col);
ui->test->setText(item->text());
stream_out<<item->text()<<" "; //debug到这一行的时候跳到qtablewidget.h文件中的
i++; // inline QString text() const
// { return data(Qt::DisplayRole).toString(); }
} // 但最终的结果是写文件的结果是正确的
stream_out<<endl;
row++;
}
望高手指教,不胜感激![ 此帖被magic_fj在2009-05-12 09:30重新编辑 ]