引用头文件QCryptographicHash
#include <QCryptographicHash>
QString md5;
QString pwd=ui->txtPassword->text();
QByteArray bb;
bb = QCryptographicHash::hash ( pwd.toLatin1(), QCryptographicHash::Md5 );
md5.append(bb.toHex());
引用头文件QCryptographicHash
#include <QCryptographicHash>
QString md5;
QString pwd=ui->txtPassword->text();
QByteArray bb;
bb = QCryptographicHash::hash ( pwd.toLatin1(), QCryptographicHash::Md5 );
md5.append(bb.toHex());