PDA

View Full Version : why command prompt being launched when ever i am launching my qt gui app?



newtolinux
8th January 2011, 12:29
First of all i would like to say i am a beginner in qt.
my question is:
A command prompt being launched in parallel when ever i am launching my qt gui app.
All qDebug() statement which i wrote are printing onto command prompt, not in qt creator's application output tab.(FYI: xp, qt-V4.6.1)
May be basic,but can some tell me the reason? what should i do to avoid it?

tbscope
8th January 2011, 12:38
Check if you have something like this in your .pro file


config += console

newtolinux
8th January 2011, 12:42
No, i dont have such line. here is my profile



QT += webkit
TARGET = myFirst
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp
HEADERS += mainwindow.h
RESOURCES += resources.qrc
CONFIG += qt warn_on release

tbscope
8th January 2011, 12:56
Do you use QApplication or QCoreApplication?

newtolinux
8th January 2011, 13:04
i am using QApplication.
In main i am creating like this

QApplication::setStyle(new QPlastiqueStyle);
QApplication app(argc, argv);

in run settings the option "run in terminal" was also unchecked.

ChrisW67
10th January 2011, 00:19
Add:


CONFIG -= console

to your PRO file.