Results 1 to 5 of 5

Thread: Qt 5 Read a Text File With Delimiters

  1. #1
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Qt 5 Read a Text File With Delimiters

    To find out how to read a text file with delimiters, go here:

    http://tomtheprogrammer.wordpress.co...th-delimiters/

  2. #2
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5 Read a Text File With Delimiters


  3. #3
    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: Qt 5 Read a Text File With Delimiters

    I this weren't such a good example on how not to do it, I would consider this SPAM.

    Cheers,
    _

  4. #4
    Join Date
    Feb 2013
    Posts
    65
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Qt 5 Read a Text File With Delimiters

    Can you give me some pointers on how to do it correctly? I would really appreciate it. I'm a functional programmer, a novice in may respects. Not experienced and polished. I would appreciate it if you could lead me to some better programming. I'll change the code accordingly. I was just trying to save someone some time searching the web for code solutions. Please help me make a better solution. I remember searching the web on how to read and disguard the delimiters to get to the text file data. My solution works, but if there is a better way, please show me. Thanks.
    Last edited by te777; 9th November 2014 at 12:36.

  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: Qt 5 Read a Text File With Delimiters

    Quote Originally Posted by te777 View Post
    I was just trying to save someone some time searching the web for code solutions.
    You already did that by posting this on your blog. No need to spam the forum.
    Especially no need to repeat the link again just to bump the thread.

    The only "value" regarding the topic is the obvious suggestion to use
    • QFile for opening files (no, really?)
    • QTextStream for reading text files line by line
    • QString::split() for splitting a line at a delimiter

    Hidden in tons of unrelated, applications specific code.

    Cheers,
    _

Similar Threads

  1. How to read the text of a pdf file?
    By Momergil in forum Newbie
    Replies: 4
    Last Post: 22nd January 2016, 10:45
  2. Read unicode text from file
    By Boron in forum Qt Programming
    Replies: 2
    Last Post: 24th October 2012, 15:27
  3. Read from text file
    By kulsekarr in forum Newbie
    Replies: 3
    Last Post: 8th June 2012, 12:11
  4. Read Text file using structure..
    By umulingu in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2009, 11:22
  5. How to read text only as it is from file
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2007, 08:47

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.