add QT += xml in your pro-file and rebuild project.