Results 1 to 3 of 3

Thread: QTextStream No Proper ending

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default QTextStream No Proper ending

    dear Friends
    I have a QTextStream in which I am using for reading a file. I am writing Like this

    while(!in.atEnd())
    {
    in >> var1 >> var2;
    }

    Now althugh its ending but it collecting the values 0 0 as the last value in the file, in the file there is no 0 ,0 values...I think its not recognizing the proper ending of the file.
    Any suggestions would be highly appreciated. Thanks sujan

  2. #2
    Join Date
    Sep 2010
    Posts
    7
    Qt products
    Qt3
    Platforms
    MacOS X

    Default Re: QTextStream No Proper ending

    Can you give a complete example, including the input which causes this problem?

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

    Default Re: QTextStream No Proper ending

    It is recognizing the end of the file but probably "var1" and "var2" are incompatible with the types of data read from the file (i.e. you might be reading text and trying to store it in integer variables).
    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.


Similar Threads

  1. Proper QList usage
    By space_otter in forum Newbie
    Replies: 5
    Last Post: 22nd June 2010, 06:57
  2. Emulator Starting and ending
    By mcwar in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 13th January 2010, 13:22
  3. signal ending nowhere...
    By miwarre in forum Newbie
    Replies: 2
    Last Post: 2nd September 2009, 16:38
  4. Proper way of using Designer for MainWindows
    By Doug Broadwell in forum Newbie
    Replies: 1
    Last Post: 11th October 2006, 07:20
  5. Proper way to #include Qt?
    By pherthyl in forum Qt Programming
    Replies: 1
    Last Post: 11th August 2006, 02:15

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
  •  
Qt is a trademark of The Qt Company.