Hi, guys.

When I do the following my lineEdit is empty(note that comment is NOT an empty QString)

Qt Code:
  1. QTableWdiget *table = QTableWidget;
  2. ...
  3. lineEdit->setText(comment);
  4. table->setCellWidget(0, commentCol, lineEdit);
To copy to clipboard, switch view to plain text mode 

But this lineEdit is not empty if I do
Qt Code:
  1. QTableWdiget *table = QTableWidget;
  2. ...
  3. table->setCellWidget(0, commentCol, lineEdit);
  4. lineEdit->setText(comment);
To copy to clipboard, switch view to plain text mode 

Who knows why this happens? Thanks.