You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

reva

Beginner

  • "reva" is female
  • "reva" started this thread

Posts: 5

Location: Bangalore

  • Send private message

1

Friday, September 4th 2009, 8:02am

How to read from a file & write that data into other file using Qfile in Qtdesigner

Hiiiii How to read data from a file for ex: x.txt The first 3 lines of the data in this file is as shown below

Source code

1
2
3
sss   1111  23 2 22 1 54.999 34.88 7.8 3.4 7.8 xxx
mnn 1212  11 1 45 2 34.566 23.88 4.5 2.6 4.5 
ddd  2134  22 4 33 1 43.999 12.09 2.4 5.7 5.7 rrr

1)Now i need to read this file line by line & write it into one more file say y.txt
How is it???
2)If i have a need to check for condition & then write into a file only satisfying data.
for example i wont to write into a file where 11th colmns data is between a range that is say 4.0 to 5.0
only data which satisfies this condition must be written in the file.How is this done using Qfile in Qt designer.
For the above data i need the output file y.txt to have

Source code

1
2
mnn 1212  11 1 45 2 34.566 23.88 4.5 2.6 4.5 
 ddd  2134  22 4 33 1 43.999 12.09 2.4 5.7 5.7 rrr

How is it?????? Help me out i am new to Qt designer ?( :?: ?(