Can I directly insert the string into particular cell in QTableWidget? ( Without using QTableViewItem)
Can I directly insert the string into particular cell in QTableWidget? ( Without using QTableViewItem)
No, you can't --- QTableWidgetItems are the cells.
Last edited by jacek; 8th September 2006 at 15:32. Reason: corrected class name
I guess you were both speaking about QTableWidgetItems, right?![]()
Yes, QTableWidgetItems.
Hi all,
I am trying to use QTableWidgetItem to add a string to a tablewidget.But i coudnt able to add.
strcpy(Temp,val_pnt->Row[i].Column[j].ColumnValue);
str.sprintf("%s",Temp);
ui->tableWidget->setItem(i,j,new QTableWidgetItem(str));
The above code is not working properly.
Could anyone please tell me what i am wrong.?
Thanks in advance.
Regards
Vinithr
Added after 22 minutes:
hi,
The problem is fixed.The problem was Temp declared as pointer instead of a specific array
Thanks
Vinithr
Last edited by vinithr; 5th August 2012 at 14:06.
Bookmarks