Umm, assign a new invalid value to it:
Qt Code:
  1. QDateTime test = QDateTime::currentDateTime();
  2. qDebug() << test.isValid(); // true
  3. test = QDateTime();
  4. qDebug() << test.isValid(); // false;
To copy to clipboard, switch view to plain text mode