QT生成随机数

#include 
#include 
#include     
//老方法
    //    srand(QTime(0, 0, 0).secsTo(QTime::currentTime()));
    //        int a = rand(); //生成随机数
    //新方法
    //    qint16 rand = QRandomGenerator::global()->bounded(100); // 0-100随机数

你可能感兴趣的:(qt,java,数据库)