[Qt-interest] What wrong with this code..

Yuvaraj R yuvaraj at ongobiz.com
Tue Jun 23 18:18:33 CEST 2009


Hi All

   I created the Table widget to insert the call details...But it is not
showing the added items in widget...

My code is like..
 list << "S.No" << "CallerName" << "Call Start Time" << "Call End Time" <<
"Call Duration";

ui->tableWidget->setColumnCount(2);

 ui->tableWidget->setHorizontalHeaderLabels(list);

ui->tableWidget->verticalHeader()->hide();

QTableWidgetItem *ten = new QTableWidgetItem(tr("1"));

QTableWidgetItem *ten1 = new QTableWidgetItem(tr("Yuvaraj"));

QTableWidgetItem *ten2 = new QTableWidgetItem(tr("Incoming"));

QTableWidgetItem *ten3 = new QTableWidgetItem(tr("outgoing"));

QTableWidgetItem *ten4 = new QTableWidgetItem(tr("total"));

ui->tableWidget->setItem(0,0,ten);

ui->tableWidget->setItem(0,1,ten1);



it is displaying only the headers...



Whats wrong with this code..



Thanks



Yuvaraj R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090623/947ee294/attachment.html 


More information about the Qt-interest-old mailing list