case "the":
//^^^ case label must lead to a constant expression
I am not aware of qt, but you can give this a try. You can avoid switch and directly use == for comparison, if QString is no different than a normal std::string.
if( word == "the" )
{
// ..
}
else if( word == "at" )
{
// ..
}
// ....