[Qt-interest] How to use QFile with = operator?

Matthias Pospiech matthias.pospiech at gmx.de
Fri Apr 24 11:00:06 CEST 2009


Rohan McGovern schrieb:
>
> Correct, because QFile is a QObject and QObjects are designed not to 
> be copied.
>
> In your above example, you could just call close(); 
> setFileName(...); on the file instead.
>
>   
Ok, but what would be the equivilent for QTextStream ?
Is it:

out.setDevice(&file)


instead of

QTextStream out(&file);





More information about the Qt-interest-old mailing list