Results 1 to 2 of 2

Thread: Accessing the entire file..

  1. #1
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Accessing the entire file..

    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
    All you have to decide is what to do with the time that is given to you

  2. #2
    Join Date
    Feb 2006
    Location
    Warsaw, Poland
    Posts
    45
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Accessing the entire file..

    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() ) );

Similar Threads

  1. read file from end to beginning..
    By soul_rebel in forum Qt Programming
    Replies: 11
    Last Post: 4th June 2012, 01:20
  2. Can you specify a file engine?
    By skimber in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2008, 15:54
  3. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  4. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  5. Accessing DTD in an XML file via QtXml module?
    By jorma in forum Qt Programming
    Replies: 1
    Last Post: 6th May 2006, 18:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.