Thanks alot,it got solved by including <QtGui>

I was tring with <qDebug>