Qt编程技巧 Qt随机数的产生

首先调用函数
    qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
产生一个进程

然后调用函数
    n = qrand();
n就是所差生的随机数

你可能感兴趣的:(编程,qt)