字节数转成字符串(文件大小转字符串)
#字节数转成字符串
#include <qmath.h>
#include <cmath>
static QString sizeToString(qint64 size)
{
static const char *const strings[] = { "b", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
if (size <= 0)
return StorageModel::tr("
原创
2021-01-02 18:01:45 ·
608 阅读 ·
0 评论