to write :
QFile file( s_filename
);
{
os << qMessage->toPlainText() << endl;
}
QFile file( s_filename );
if (file.open(QIODevice::WriteOnly))
{
QTextStream os(&file);
os << qMessage->toPlainText() << endl;
}
To copy to clipboard, switch view to plain text mode
to read ?
qMessage << is; // 226
qMessage << is; // 226
To copy to clipboard, switch view to plain text mode
compiler says :
226 C:\Qt\test\sms\menu.cpp no match for 'operator<<' in '((ApplicationWindow*)this)->ApplicationWindow::qMessage << is'
note C:\Qt\4.1.1\src\corelib\tools\qchar.h:291 candidates are: QDataStream& operator<<(QDataStream&, const QChar&) etc...
How can I read in one step as I wrote to the file ?
NB idem if I use to QString as for >>
Bookmarks