int hh = 0;
int mm = 0;
int ss = 0;
int size = 3665;
hh = size/3600;
if(hh > 0){
int t_hh = size%3600;
mm = t_hh/60;
if(mm > 0){
ss = t_hh%60;
}else{
ss = t_hh;
}
}else{
mm = size/60;
if(mm > 0){
ss = size%60;
}else{
ss = size;
}
}
QString ts = QString("%1:%2:%3").arg(hh).arg(mm).arg(ss);
qDebug()<<"sss"<<ts;
Qt 数字转时分秒
最新推荐文章于 2024-07-17 10:41:17 发布