to close this window..."解决方法" /> to close this window..."解决方法 - 源码之家" />

QtCreator调试控制台程序时,程序退出后显示"Press to close this window..."解决方法

在linux平台下调试程序时,程序结束后总是显示要按return再关闭窗口,非常繁琐。

QtCreator调试控制台程序时,程序退出后显示"Press <RETURN> to close this window..."解决方法

QtCreator版本4.0.5。

可以把.pro文件中的

CONFIG += console去掉,就可以了。

QT += core
QT -= gui

CONFIG += c++11

TARGET = createSignal
#CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp \
    SemaphoreWrapper.cpp

HEADERS += \
    SemaphoreWrapper.h

 

 

参考:https://forum.qt.io/topic/85950/qt-creator-launch-app-not-closing-and-or-press-return-to-close-this-window-missing/3