[Qt-interest] Process_line

Donal O'Connor donaloconnor at gmail.com
Mon Nov 9 17:29:16 CET 2009


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091109/2d935cb8/attachment.html 


More information about the Qt-interest-old mailing list