Could You help me write some little code example how to save cell vaule into file and then how to open the file and insert that value into specific cell?
Well, I could.
But at the same tocken you could just read the docs, which already supply all the examples you need!
From the docs:
QFile file( "file.txt" );
if ( file.open( IO_ReadOnly ) ) {
int i = 1;
while ( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
printf( "%3d: %s\n", i++, line.latin1() );
lines += line;
}
file.close();
}
QStringList lines;
QFile file( "file.txt" );
if ( file.open( IO_ReadOnly ) ) {
QTextStream stream( &file );
QString line;
int i = 1;
while ( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n'
printf( "%3d: %s\n", i++, line.latin1() );
lines += line;
}
file.close();
}
To copy to clipboard, switch view to plain text mode
Bookmarks