The docs say it all - just make sure you read correctly
QListWidgetItem * QListWidget::item ( int row ) const
1.
QString t = lwDataList->item(n - 1);
got it?

try
Qt Code:
  1. QString t = lwDataList->item(n - 1)->text();
To copy to clipboard, switch view to plain text mode