Use qt to write a program that randomly generates hexadecimal data

I can give you an example of a program written in Qt that randomly generates hexadecimal data: #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); qsrand(QTime: :currentTime().msec()); QString hex = QString("%1").arg(qrand(), 4, 16, QChar('0')); qDebug() << hex; return app.exec (); }

Guess you like

Origin blog.csdn.net/weixin_42605397/article/details/129606808