Use any of the print or output stream functions.

Google for printf or cout, or check the qt docs for qdebug or qtextstream(stdout)