QTime time; time= QTime::currentTime(); qsrand(time.msec()+time.second()*1000); int xxx=qrand()%100 %100 :在0-100中选出随机数