• 5841阅读
  • 1回复

谁能用QFile::resize ( qint64 sz )与QFile::resize ( const QString & fileName, qint64 sz ) 写个例子 [复制链接]

上一主题 下一主题
离线9605201
 
只看楼主 倒序阅读 楼主  发表于: 2008-12-07
— 本帖被 XChinux 执行加亮操作(2009-01-06) —
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 ) 写个例子
离线9605201
只看该作者 1楼 发表于: 2008-12-09
继续关注
快速回复
限100 字节
 
上一个 下一个