HPFE455
asked on
How to hide console window in QT without affecting the application logging
My QT application is opening and closing console window ( command prompt) while starting the application.
I have hidden the console window by removing the below config from the project.pro file.
CONFIG += console
But this will affecting the application logging.
Environment: QT 4.7.3/ Windows
I have hidden the console window by removing the below config from the project.pro file.
CONFIG += console
But this will affecting the application logging.
Environment: QT 4.7.3/ Windows
What are you using for logging purposes?
ASKER
qDebug(), qWarning()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
qDebug() can print the log in IDE out put tab without having console open, this will be good for your development env but when you deploy your application you have no other choice but to use QFile for logging,
I can think of one more way of showing this data in some of your application window, like you mame a connection when ever you want to print any Qdegug() to one of you slot and write this debug data in some QTextWidget or something and keep this widget hidden unless you dont want to see this
I can think of one more way of showing this data in some of your application window, like you mame a connection when ever you want to print any Qdegug() to one of you slot and write this debug data in some QTextWidget or something and keep this widget hidden unless you dont want to see this
ASKER
Thanks jkr
My logging implementation is similar to the above link. But if I disable the console, the
message handler function is not getting called. It never hitting the break point. The qInstallMsgHandler is implemented in a separate class.
My logging implementation is similar to the above link. But if I disable the console, the
message handler function is not getting called. It never hitting the break point. The qInstallMsgHandler is implemented in a separate class.