Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I see the program output in Qt-Creator?

Tags:

c++

qt

qt-creator

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

like image 483
Armen Tsirunyan Avatar asked Nov 13 '10 08:11

Armen Tsirunyan


People also ask

What can Qt Creator do?

Qt Creator is a cross-platform integrated development environment (IDE) built for the maximum developer experience. Qt Creator runs on Windows, Linux, and macOS desktop operating systems and allows developers to create software across desktop, mobile, and embedded platforms.

Is Qt Creator a good idea?

QtCreator is stable enough and a comfortable IDE, although compile/debug cycles are slower on Windows than with Visual Studio. It doesn't have all the fancy features Visual Studio offers, but after using it for a while I just realized I wasn't missing them.

What is difference between Qt Designer and Qt Creator?

Qt Creator is Qt's IDE. You don't have to use it, but it greatly simplifies Qt development. Qt Designer is a graphical tool that lets you build QWidget GUIs. Qt Quick Designer is similar, but for building QML GUIs.


1 Answers

I know that this answer do not answer the original question, but since when searching for "No application output" we found this answer...

See the following answer: https://stackoverflow.com/a/26325743/808101 This only apply to qDebug() and similar functions (not direct output to stdout/stderr). In my case, I have to set QT_ASSUME_STDERR_HAS_CONSOLE environment variable to 1 in QtCreator in order to see qDebug() messages inside "Application Output" window.

like image 198
benjarobin Avatar answered Oct 13 '22 21:10

benjarobin