. 首先需要包含必要的头文件: #include <QCoreApplication> #include <QCryptographicHash> #include <QFile> 创建一个 QCoreApplication 对象,以便在控制台中运行程序: