• 3432阅读
  • 0回复

有关输出流和QTableWidget的问题 [复制链接]

上一主题 下一主题
离线magic_fj
 
只看楼主 倒序阅读 楼主  发表于: 2009-05-12
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重新编辑 ]
快速回复
限100 字节
 
上一个 下一个