I have included the QTextStream in header among others: #include <QtCore> #include <QMainWindow> #include <QProgressDialog> #include <QColorDialog> #include <QHash> #include <QFile> #include <QTextStream> But still have the errors.