Dear my friends... I am writing a program with Qt and SuSE 9.1. I want my application read the content of file "otentik.txt". I do like this : QString lines; QFile file( "otentik.txt" ); if ( file.open( IO_ReadOnly ) ) { QTextStream stream( &file ); QString line; int i = 1; lines = stream.readLine(); QString cetak = QString("file otentik %1 : %1") .arg(QString::number(i)) .arg(lines); printf(cetak); file.close(); QString pesan = QString("sampe sini 1. init. lines =%1") .arg(lines); statusBar()->message(pesan, 300000); } but the content of "lines" is always empty. The status of my QMainWindow(MDI Form) shows only : "sampe sini 1. init.lines=". I put this code into init() (constructor) of my QMainWindow. No error in compilation process. Please tell me why. Thank you very much. __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo
participants (1)
-
Prabu Subroto