[Qt-interest] Qt app launched from CLI or GUI? Can I know in code?

Konstantin Tokarev annulen at yandex.ru
Tue Jul 26 19:40:24 CEST 2011


26.07.2011, 21:32, "Kishore Jonnalagadda" <kitts.mailinglists at gmail.com>:
> Basically, in my application, I would like to install a message handler for debug messages so that they are logged to a file. However, I would like to do so only if the app were launched from the GUI. So in case the app was launched from the CLI, it should output to the terminal as usual.
>
> Is this possible? Particularly on a linux machine.

Your "GUI" debug handler is ~/.xsession-errors :)

-- 
Regards,
Konstantin



More information about the Qt-interest-old mailing list