记录一下,以备以后查阅
QString temp;
for(int i = 0; i < 10; ++i){
temp = QString("%1").arg(i+1,4,10,QChar('0'));
}
以上为总位数为4位,前面补0的代码。
记录一下,以备以后查阅
QString temp;
for(int i = 0; i < 10; ++i){
temp = QString("%1").arg(i+1,4,10,QChar('0'));
}
以上为总位数为4位,前面补0的代码。