Answer the question
In order to leave comments, you need to log in
How to get file size?
Hello, I'm trying to get the file size in this way:
qint64 labor::fileSizer(QString nameRar)
{
qint64 fileSize=0;
QFile fileRar("C:\\QtProject\\modulINFO\\temp\\lab\\lab2\\"+nameRar+".rar");
fileRar.open(QIODevice::ReadOnly);
fileSize = fileRar.size();
fileRar.close();
return fileSize;
}
ui->label_2->setText(QString::number(fileSizer("test1")));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question