Results 1 to 5 of 5

Thread: Read TXT file with QFile

  1. #1
    Join Date
    Nov 2011
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Read TXT file with QFile

    Hi
    Want to read the txt file with the help of QFile and when find the desired string(value) then return that.
    There is a txt file with following format::
    12asd = 12asd
    34fgh = 34fgh
    98nbv = 98nbv

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Read TXT file with QFile

    Ok, and what is the question?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Nov 2011
    Posts
    8
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Read TXT file with QFile

    How to read the txt file with the help of Qfile.......

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Read TXT file with QFile

    Hmm... most probably using QFile's "read" method.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Read TXT file with QFile

    Or, even more conventient, using QTextStream on the file.

    Cheers,
    _

Similar Threads

  1. Can't read large file (2.5GB) with QFile
    By enricong in forum Qt Programming
    Replies: 6
    Last Post: 18th July 2011, 04:14
  2. Read and Write file to/from QFile
    By ruben.rodrigues in forum Qt Programming
    Replies: 1
    Last Post: 31st March 2011, 14:57
  3. QFile - file read parts of the buffer
    By eugen_Qt in forum Qt Programming
    Replies: 4
    Last Post: 10th November 2009, 14:52
  4. Replies: 5
    Last Post: 27th May 2009, 12:49
  5. QFile can't read a file
    By Raccoon29 in forum Qt Programming
    Replies: 3
    Last Post: 11th February 2009, 20:24

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.