With the following code Put a DateEdit in a Cell of a TableWidget:
Qt Code:
  1. QDateEdit *dateEdit = new QDateEdit();
  2. dateEdit->setDate(QDate::currentDate());
  3. ui->twHomeworkList->setCellWidget(ui->twHomeworkList->rowCount()-1,1,dateEdit);
To copy to clipboard, switch view to plain text mode 

Now I tied to read the Date fromt the Edit:
Qt Code:
  1. QString x= static_cast<QDateEdit*>(ui->twHomeworkList->cellWidget(1,y))->date().toString();
To copy to clipboard, switch view to plain text mode 
But the application just crash.
Can somebody help me?

Greets ceddy