I am using a qDebug()
of Qt Framework for printf
something on the screen. It works just fine when I run application from Qt Creator, but when I try to execute it from Windows cmd
it shows nothing. Why that happens?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You have to add
CONFIG += console
to your projects .pro
file and do not forget to clean and build (rebuild) your project.
回答2:
Run your application with
application.exe > log.txt 2>&1
It redirects stderr to stdout and stdout to a file.