Try adding #include <QtGlobal>