[Qt-interest] stdout of MSWin GUI application run from console
Paul Miller
paul at fxtech.com
Wed Apr 13 16:54:40 CEST 2011
On 4/13/2011 9:40 AM, Felipe Magno de Almeida wrote:
> On Wed, Apr 13, 2011 at 9:24 AM, Graeme Gill<graeme2 at argyllcms.com> wrote:
>> Thiago Macieira wrote:
>>> CONFIG += console
>>
>> Hi,
>> no that's not the same at all. It looks the same
>> when run from the command line, but then pops a console
>> window when run from the GUI (explorer).
>>
>> The approach I suggested doesn't pop up a console
>> when invoked from the GUI, behaving instead like
>> applications does on Linux/X11. (Try it for
>> yourself.)
>
> Why do you think the Linux behavior is better on Windows? All other
> Windows applications do the "Windows-way". If your application
> is a console application, then it opens a console if not ran from one
> or if it is not a console application then it doesn't use one at all. This
> is how Windows users are accostumed. QT is not supposed to be
> a on-size-fits-all solution, but it also tries to be as native to the
> platform as possible. If you need this behavior then you should
> use the code you just posted. But this shouldn't be imposed on
> all other users.
This was my point. I only want the console output when the app is run
from a console. When run from the GUI, I don't want the console popping
up. I haven't been able to find a reliable way to make a Qt app on
Windows that behaves like a console app when run from the console (ie.
prints stuff to the console), and a GUI app when run from Explorer.
More information about the Qt-interest-old
mailing list