tags:

views:

139

answers:

1

As for me, functions like QString::section and QRegExp bring Qt closer to scripting languages and that is very appreciated. For example, given a CSV file, in order to find out necessary columns we process the header as follows:

    int AmountInd = line.left(line.indexOf("Amount")).count(',');

to get the index of that column. Then, for forthcoming lines extracting that column's substring is easy:

    QString AmountStr = line.section(',', AmountInd, AmountInd);
    double Amount = AmountStr.toDouble();
+1  A: 

I really like there ForEach loop and RegExp. Those have saved me a lot of time. But the feature that has saved me the most time is definitely Qt Creator.

Lucas McCoy
true, foreach is awesme
MadH