我可以看到Qt-Creator中的程序输出吗? [英] Can I see the program output in Qt-Creator?

查看:149
本文介绍了我可以看到Qt-Creator中的程序输出吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Qt Creator编写了一个简单的OpenGL程序,它基本上创建了一个QGLWidget,显示它,并运行应用程序循环。我通常喜欢调试更多的诊断消息打开和关闭由预处理器符号,使用实际的调试器和手表等。在Qt Creator中,我们有一个名为应用程序输出的标签,但我看到的是 std :: cout std:没有输出。 :cerr 。现在我知道我可以从cmd.exe启动我的应用程序(是的,我使用Windows,喜欢它:P),看到输出,但我希望我可以看到直接从IDE的输出。那可能吗?感谢

I am writing a simple OpenGL program with Qt Creator which basically creates a QGLWidget, shows it, and runs the application loop. I usually like debugging more with diagnostic messages turned on and off by preprocessor symbols that using an actual debugger and watches etc. In Qt Creator we have a tab called Application Output, but all I see there is "Starting xxx.exe. xxx.exe exited with code 0". No output from either std::cout or std::cerr. Now I know I could start my application from cmd.exe (yes, I am using Windows, love it :P) and see the output there but I wish I could see the output directly from the IDE. Is that possible? Thanks

推荐答案

通常,应用程序输出窗格工作正常。您确定要看到 cmd.exe (您是否真的尝试过?)的输出?它通常被关闭为UI应用程序,以避免控制台窗口弹出。尝试 CONFIG + = console 。同时检查是否在应用程序输出中看到 qDebug()消息

Usually the Application Output pane works fine. Are you sure that you would see the output from cmd.exe (have you actually tried?)? It's usually turned off for UI applications to avoid console windows from popping up. Try CONFIG += console. Also check if you see qDebug() messages in the Application Output.

这篇关于我可以看到Qt-Creator中的程序输出吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆