PDA

View Full Version : adding rows to tablewidget



reshma
12th March 2009, 14:23
hiii,

can anyone help me out in adding rows to table widget at runtime??

plzz..:rolleyes:

navi1084
12th March 2009, 14:25
Use insertRow() function. The argument is where u need to insert.
For ex: if u need to append the row then user insertRow(tableWidget->rowCount() - 1).

reshma
12th March 2009, 14:30
hii
thnks..

next i need to insert data into dat row...

so how can i do dat??
i used setItem() but nothing is being displayed just a row is being added??

navi1084
12th March 2009, 14:32
Data you can insert interms of QTableWidgetItem. So create the object of that and set the data using setText(). and use tableWidget->setItem(row, column, item)

reshma
12th March 2009, 14:40
thnks a lot......



i was fixed in dis problem since soo many days.....thnks..