QFile类是一个操作文件的输入/输出设备。详情请见…… #include 公有成员 QFile () QFile ( const QString & name ) ~QFile () QStringname () const void setName ( const QString & name ) typedefQCString (* EncoderFn ) ( const QString & fileName ) typedefQString (* DecoderFn ) ( const QCString & localfileName ) boolexists () const boolremove () virtual boolopen ( int m ) boolopen ( int m, FILE * f ) boolopen ( int m, int f ) virtual void close () virtual void flush () virtual Offset size () const virtual Offset at () const virtual boolat ( Offset pos ) virtual boolatEnd () const virtual Q_LONG readBlock ( char * p, Q_ULONG len ) virtual Q_LONG readLine ( char * p, Q_ULONG maxlen ) Q_LONG readLine ( QString & s, Q_ULONG maxlen ) virtual intgetch () virtual intputch ( int ch ) virtual intungetch ( int ch ) inthandle () const 静态公有成员 QCStringencodeName ( const QString & fileName ) QStringdecodeName ( const QCString & localFileName ) void setEncodingFunction ( EncoderFn f ) void setDecodingFunction ( DecoderFn f ) boolexists ( const QString & fileName ) boolremove ( const QString & fileName ) 重要的继承成员 virtual QByteArrayreadAll () 详细描述 QFile类是一个操作文件的输入/输出设备。 QFile是用来读写二进制文件和文本文件的输入/输出设备。QFile可以自己单独被使用,但是如果和QDataStream或QTextStrea 因篇幅问题不能全部显示,请点此查看更多更全内容