|
1Qter豆
从txt中读取这些数据,
10:14:42 $GPDTM,W84,,0.0,N,0.0,E,0.0,W84*6F
10:14:43 $GPRMC,101443.00,A,4155.48410,N,12323.86670,E,0.049,255.81,160411,,,A*6A
10:14:43 $GPVTG,255.81,T,,M,0.049,N,0.090,K,A*32
10:14:44 $GPRMC,101444.00,A,4155.48380,N,12323.86717,E,0.040,251.46,160411,,,A*65
10:14:44 $GPVTG,251.46,T,,M,0.040,N,0.073,K,A*39
10:14:44 $GPGGA,101444.00,4155.48380,N,12323.86717,E,1,05,11.26,89.6,M,7.8,M,,*6D
这只是一部分,然后按照时间相同的一起再发到textBrowser上,比如判断第一个和第二个时间不同,然后就发第一条,再判断第二个和第三个依次判断相同的一起发,时间间隔是一秒。
我现在会读取数据,但是不知道怎么做能把时间相同的一起发而且还要间隔一秒再发下一批一样的。
|
最佳答案
查看完整内容
QTime QTime::fromString(const QString & string, const QString & format) [static]
Returns the QTime represented by the string, using the format given, or an invalid time if the string cannot be parsed.
These expressions may be used for the format:
Expression Output
h the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
hh the hour with a leading zero (00 to 23 or 01 to 12 if AM ...
|