I have same Qt code which runs in both linux and windows . But it is acting different in each case. In linux it is behaving correct , but while in windows it is not.
you can see that in windows platform it is returning null string and in linux platform it is behaving as expected. What could be the reason ?


The default constructor of
QTimeproduces aninvalidtime, most operations on an invalid time will fail or return another invalid time. CallingaddSecsstill leaves you with an invalid time and callingtoStringon an invalid time returns an empty string.To construct a
QTimeof midnight you need to use: