[Qt-interest] What wrong with this code..
Patrick Vollebregt
jeet.nl at gmail.com
Tue Jun 23 18:50:44 CEST 2009
Hi,
Use ui->tableWidget->setRowCount(1) for example.
However, I would strongly recommend using a QTableView and use or write
a model for performance reasons.
Kind regards,
Patrick Vollebregt.
> 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
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090623/be7d6b8e/attachment.html
More information about the Qt-interest-old
mailing list