QTime time; // create a null time object if (time.isNull()) { // do something if the time object is null }
QTime time = QTime::fromString("00:00:00.000"); // create a time object with null values if (time.isNull()) { // do something if the time object is null }The QTime class is part of the QtCore package in the Qt library.