Results 1 to 3 of 3

Thread: reading/writing to file

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Aug 2006
    Posts
    27
    Thanks
    2
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: reading/writing to file

    Also posible:

    Qt Code:
    1. out << int1 << "\t"<<int2 << "\t"<<int3 <<endl;
    2. in >> int1;
    3. in >> int2;
    4. in >> int3;
    To copy to clipboard, switch view to plain text mode 

    That's how I would do it.
    Or:

    Qt Code:
    1. QStringList tsTemp;
    2. QString sTemp;
    3.  
    4. out << int1 << "\t"<<int2 << "\t"<<int3 <<endl;
    5. sTemp = in.readLine();
    6. tsTemp = sTemp.split("\t");
    7. int1 = tsTemp.at(0);
    8. int2 = tsTemp.at(1);
    9. int3 = tsTemp.at(2);
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    Bart.

  2. The following 2 users say thank you to windkracht8 for this useful post:

    ak (21st August 2006), QiT (12th August 2006)

Similar Threads

  1. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 11:47
  2. .ui file name and classname
    By Rekha in forum Newbie
    Replies: 3
    Last Post: 12th August 2006, 01:53
  3. SQLite-DB in a qrc file
    By Lykurg in forum Qt Programming
    Replies: 5
    Last Post: 31st July 2006, 19:24
  4. QHttp GET File & Password
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 11th June 2006, 13:04
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

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.