https://www.it1352.com/1270326.html
int size = 0;
QFile myFile("图片路径");
if (myFile.open(QIODevice::ReadOnly)){
size = myFile.size();
myFile.close();
}
if(size>330000){
this->imgPathList.clear();
QMessageBox::information(this,"图片过大","图片不能超过320kb \n");
return;
}