if it's for debug purpose use qDebug("Your text goes here");

Other than that you can use standard c / c++ methods, like:

printf("Your text");

or

std::cout << "Your text";