change a printf to a qDebug

and remving an unneeded \n