It's nothing Qt related. string class is in std namespace, so either place an "using namespace std;" statement somewhere near the beginning of the file or replace all occurences of "string" with "std::string".

Just before you do that, think if that's really what you want - Qt has methods for converting to/from std::string (QString::fromStdString() and QString::toStdString()) so possibly a better approach could be to equip your class with methods that operate using QString and if you need an std string, just use the conversion methods from QString. This would let your class blend better into Qt (if that something you consider worth the trouble).