I tried using QDateTime’s fromTime_t as follows:
QDateTime t;
time_t elapsedTime;
t.fromTime_t(elapsedTime);
The result is that nothing is assigned to the QDateTime object.
However, using the function setTime_t does work (this one isn’t static).
Is something going on here I’m missing?
fromTime_tis static and returns aQDateTime, so you have to use it like this:or you can do