{"id":1960,"date":"2022-02-06T15:47:57","date_gmt":"2022-02-06T07:47:57","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=1960"},"modified":"2022-02-06T15:47:57","modified_gmt":"2022-02-06T07:47:57","slug":"qt5%e5%a6%82%e4%bd%95%e5%be%97%e5%88%b0%e6%96%87%e4%bb%b6%e7%9a%84md5%e5%80%bc","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/1960","title":{"rendered":"QT5\u5982\u4f55\u5f97\u5230\u6587\u4ef6\u7684md5\u503c"},"content":{"rendered":"\n
\u76f4\u63a5\u4e0a\u4ee3\u7801\u5427\uff0cqt\u5f97\u5230\u6587\u4ef6md5\u7684\u503c\u5e94\u8be5\u8fd8\u662f\u6bd4\u8f83\u5e38\u7528\u5230\u7684\u4e00\u4e2a\u529f\u80fd\u3002<\/p>\n\n\n\n
QString ThreadDownload::getFileMd5(QString filename)\r\n{\r\n QFile theFile(filename);\r\n if(!theFile.open(QIODevice::ReadOnly)){\r\n return \"failed\";\r\n }\r\n QByteArray ba = QCryptographicHash::hash(theFile.readAll(), QCryptographicHash::Md5);\r\n theFile.close();\r\n return QString(ba.toHex());\r\n\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"\u76f4\u63a5\u4e0a\u4ee3\u7801\u5427\uff0cqt\u5f97\u5230\u6587\u4ef6md5\u7684\u503c\u5e94\u8be5\u8fd8\u662f\u6bd4\u8f83\u5e38\u7528\u5230\u7684\u4e00\u4e2a\u529f\u80fd\u3002 QString ThreadDownload::getFileMd5(QString filename) { QFile theFile(filename); if(!theFile.open(QIODevice::ReadOnly)){ return “failed”; } QByteArray ba = QCryptographicHash::hash(theFile.readAll(), QCryptographicHash::Md5); theFile.close(); return QString(ba.toHex(<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,296,9],"tags":[295,309],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1960"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=1960"}],"version-history":[{"count":1,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1960\/revisions"}],"predecessor-version":[{"id":1961,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/1960\/revisions\/1961"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=1960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=1960"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=1960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}