bool QFile::resize ( qint64 sz )
Sets the file size (in bytes) sz. Returns true if the file if the resize succeeds; false otherwise. If sz is larger than the file currently is the new bytes will be set to 0, if sz is smaller the file is simply truncated.
See also size() and setFileName().
bool QFile::resize ( const QString & fileName, qint64 sz ) [static]
This is an overloaded member function, provided for convenience.
Sets fileName to size (in bytes) sz. Returns true if the file if the resize succeeds; false otherwise. If sz is larger than fileName currently is the new bytes will be set to 0, if sz is smaller the file is simply truncated.
See also resize().
谁能用QFile::resize ( qint64 sz )与QFile::resize ( const QString & fileName, qint64 sz ) 写个例子