I tried:

Qt Code:
  1. QTableWidget *j = new QTableWidget (10000, 5, centralWidget);
  2. j->setColumnWidth (0, 500);
  3. j->setColumnWidth (1, 30);
  4. j->setColumnWidth (2, 30);
  5. j->setColumnWidth (3, 320);
  6. j->setColumnWidth (4, 310);
  7.  
  8. j->setWordWrap (true);
To copy to clipboard, switch view to plain text mode 
Also tried resizeColumnsToContents and resizeRowsToContents, but failed.

If the text is longer than the set width, I want the sentence to get break down.
Currenty, the lengthy part of the sentence just doesn't get shown.