You have an include missing. This is a C++ problem, not a Qt one, so it should be in "General Programming" forum, not here. I'm moving it there but next time please open such threads in a proper place.