Results 1 to 3 of 3

Thread: Reading file using QFile class

  1. #1
    Join Date
    Nov 2012
    Location
    Coimbatore
    Posts
    53
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Reading file using QFile class

    Hi all,

    Finger print data is stored in textfile, using QFile i read the data which have stored in .txt file but i got only "BMvV" not whole data. Can any one help me, how to read whole data in .txt file .



    Thanks in advance

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Reading file using QFile class

    Can you show us how you are reading the file?

    Make sure you are using QIODevice::Text mode while opening the file
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Reading file using QFile class

    but i got only "BMvV" not whole data
    Looks to me like this is a binary data file, not ASCII text.

Similar Threads

  1. reading hex data from QFile
    By Charvi in forum Qt Programming
    Replies: 2
    Last Post: 30th October 2012, 11:54
  2. Replies: 2
    Last Post: 24th July 2011, 21:01
  3. Reading from QFile when QTextStream is open
    By dawwin in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2011, 17:43
  4. Problems reading content of QFile
    By martinn in forum Newbie
    Replies: 12
    Last Post: 6th April 2010, 18:42
  5. Reading File using QFile and QTextStream
    By atm in forum Qt Programming
    Replies: 4
    Last Post: 13th July 2006, 23:12

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.