简体   繁体   English

运行QT4程序时抑制控制台窗口

[英]Suppressing the console window while running QT4 programs

I am trying to make an application using QT for C++ using codeblocks. 我正在尝试使用代码块使用QT for C ++创建应用程序。 Every time I run the application a command prompt window pops out followed by the gui for my application. 每次我运行该应用程序时,都会弹出命令提示符窗口,然后弹出该应用程序的gui。

How do I suppress the command prompt window? 如何隐藏命令提示符窗口?

Here the possible answer 这里可能的答案

Just remove 只需删除

CONFIG += CONSOLE 配置+ =控制台

from your .pro file 从您的.pro文件

Yet another option for Code::Blocks. Code :: Blocks的另一个选择。 In IDE menu 在IDE菜单中

Project->Properties->Build Targets: change Type from "Console Application" to "GUI Application". 项目->属性->构建目标:将类型从“控制台应用程序”更改为“ GUI应用程序”。

Found here and here 这里这里找到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM