用控制台窗口输出QT的调试信息

#include <Windows.h>

    AllocConsole()             在main函数中加

 freopen("CONOUT$","w",stdout); 在main函数中加

printf("fdsafds")之后所有的printf的内容都会到控制台窗口中输出,

#define  qDebug   printf或者利用重命名,就可以将所有debug的信息从控制台输出

发布了104 篇原创文章 · 获赞 22 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/qq_41672557/article/details/103076650