QTime QTime::addSecs(int secs) const
#includeThis code creates a QTime object representing the current time and uses the addSecs() function to add 10 seconds to it. The resulting time is printed using the toString() function. The addSecs() function is part of the QtCore package library in Qt.int main() { QTime currentTime = QTime::currentTime(); QTime newTime = currentTime.addSecs(10); qDebug() << "Current time:" << currentTime.toString(); qDebug() << "New time:" << newTime.toString(); return 0; }