~ ~ ~ My life, my little drops!!
There are times when we add a good debug message to the program to make it easier for the program to print out some of the information we need during the run or to use it to display some of the necessary information.
Then console is too important, once I always thought GUI program can not console parallel, later search is can, although can only display information, but that is enough,
Since I'm using QT to write applications, I'll explain how to set them in two different editors:
1. Qt Creator-pro Project file
Open Project file Pro, adding: CONFIG + = Console
[CPP]View PlainCopy
- HEADERS = Mainwindow.h
- SOURCES = Mainwindow.cpp
- RESOURCES = DIAGRAMSCENE.QRC
- CONFIG + = Console
It is relatively simple to set up pro files in Qt Creator, but many times we have to write QT-related code in VS, what about this time?
2, VS2008 + qt-vcproj project documents
Modify the project Properties configuration Linker------> System------> SubSystem
Put Windows (/subsystem:windows)------>console (/subsystem:console)
When the setup is complete, it will show the output information with console control, is it cool ^v^
http://blog.csdn.net/ac_huang/article/details/38919809
Show console after running non-GUI-QT program (easy to use)