in your pro file QT += xml and rebuild via make clean if necessary.