Substracting Time to QTime
Solved
General and Desktop
-
Hello,
Is it possible to substract to to a QTime. For example if a have :QTime startDayTime=QTime::fromString(startHour(),"hh:mm");
and i want to substract 2 hours from it?
Anyone got an idea of how to do so? -
You can add a negative amount of seconds
https://doc.qt.io/qt-5/qtime.html#addSecs
startDayTime.addSecs(-2 * 3600);