anh5kor
13th February 2015, 07:00
Hello
In my code I have to get system time and then add second to it and display in gui
suppose I got system_time = 10:30:40
second (from my code)= 40
display = system_time+second;i.e 10:31:20
I have added a code
unsigned int Time_second_ecu2uss;
QTime time = QTime::currentTime();
QString timeString = time.toString();
Time_second_ecu2uss = Time_ecu2uss/1000;(getting the second)
qDebug()<<"timeString"<<timeString + Time_second_ecu2uss;
but my output is timeString "10:31:20t"
In my code I have to get system time and then add second to it and display in gui
suppose I got system_time = 10:30:40
second (from my code)= 40
display = system_time+second;i.e 10:31:20
I have added a code
unsigned int Time_second_ecu2uss;
QTime time = QTime::currentTime();
QString timeString = time.toString();
Time_second_ecu2uss = Time_ecu2uss/1000;(getting the second)
qDebug()<<"timeString"<<timeString + Time_second_ecu2uss;
but my output is timeString "10:31:20t"