PDA

View Full Version : Accessing the entire file..



Kapil
28th April 2006, 07:23
Hi...

Is there any way through which i can get the entire file (on disk) copied on to my text area...
I know the way by selecting each line but can i do it using the entire file as it is...

It would be very helpful...

Thanking you...

with regards..

Kapil

naresh
28th April 2006, 07:41
You can use QByteArray QFile::readAll(); To appear it in QTextBrowser or QTextEdit just use append(cons QString&). You can use it like this ui.yourTextBrowser->append( QString( yourFile.readAll() ) );