What have you tried? Just reading the QFile documentation gives you the skeleton, and checking for empty (or all blank) lines is a trivial QString or QRegExp exercise.