[Qt-interest] Process_line
Gian Marco Gallo
gianmarco.gallo at gmail.com
Mon Nov 9 17:33:00 CET 2009
Uhm...Ian T. replied to me in the same way. So now the question is:
how can I avoid it read all the line also with the return spaces?
Il giorno 09/nov/2009, alle ore 17.29, Donal O'Connor ha scritto:
> Process line is just an example of a method you might declare to
> "process" the line.
>
> This is a user defined method but it doesn't have to be a method,
> you can do what ever you want to the line operating on the line
> QByteArray, for example, convert to a QString and do splitting or
> something....
>
>
>
> On Mon, Nov 9, 2009 at 4:25 PM, Gian Marco Gallo <gianmarco.gallo at gmail.com
> > wrote:
> Good afternoon
>
> I'm reading the QFile class definition and there's a part of code
> that I'm not able to compile:
>
> QFile file("in.txt");
> if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
> return;
>
> while (!file.atEnd()) {
> QByteArray line = file.readLine();
> process_line(line);
> }
>
> In this part of code I can directly read the content of a file but I
> don't understand from where process_line method comes out. I've
> tried to search if it's a c++ method but it's not, I've tried to
> search if it's a qt class method but it's not...so?
>
> Thanks
>
>
> Gian Marco Gallo
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
Gian Marco Gallo
vACC Italy Director
Vatsim Supervisor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091109/112c3b85/attachment.html
More information about the Qt-interest-old
mailing list