PDA

View Full Version : [B]tableWidget row,col to textEdit[B]



briang
5th November 2009, 23:17
g'day all

QTableWidgetItem* val = tableWidget->takeItem(row, col); // ok???
this line looks ok (at least no errors

textEdit->append(QString(val));
this is WRONG as is all that i have tried.

using Qt 4.5,2 kde4.3.2 QtCreator 1.2.1

QtCreator is the ants pants
regards
briang

yogeshgokul
6th November 2009, 04:22
textEdit->append(QString(val));
Yes this is wrong enough :)

To use only text of that item use:

QString QTableWidgetItem::text ()

So now your code will be:

textEdit->append(val->text());