QT output debugging information with the console window

#include <Windows.h>

    AllocConsole () added to the main function

 freopen ( "CONOUT $", "w", stdout); added to the main function

After printf ( "fdsafds") printf all the content will be output to the console window,

#define qDebug printf or by renaming, you can debug all the information from the console output

Published 104 original articles · won praise 22 · views 40000 +

Guess you like

Origin blog.csdn.net/qq_41672557/article/details/103076650