[Qt-interest] How to use QFile with = operator?
Matthias Pospiech
matthias.pospiech at gmx.de
Fri Apr 24 09:20:44 CEST 2009
I want to do the following:
QString filenameSettings = m_strSaveFilename.remove(".txt") +
"-settings.txt";
QFile file;
file = QFile(filenameSettings);
...
file = QFile(filenameResults);
...
However that is not possible:
1> error C2248: "QFile::operator =": Kein Zugriff auf private Member,
dessen Deklaration in der QFile-Klasse erfolgte.
1>
c:\programme\qt\msvc\4.5.0\include\qtcore\../../src/corelib/io/qfile.h(195):
Siehe Deklaration von 'QFile::operator ='
1>
c:\programme\qt\msvc\4.5.0\include\qtcore\../../src/corelib/io/qfile.h(62):
Siehe Deklaration von 'QFile'
The same error appears with
out = QTextStream(&file);
Any reason why this happens?
Matthias
More information about the Qt-interest-old
mailing list