[Qt-interest] stdout of MSWin GUI application run from console
Rainer Wiesenfarth
Rainer.Wiesenfarth at inpho.de
Wed Apr 13 17:16:03 CEST 2011
Am 13.04.2011 16:54, schrieb Paul Miller:
> [...]
> 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.
To me, this would make _two_ applications, probably sharing a large
amount of code.
A _GUI_ application should use the GUI only, without the need of an
attached console. If started by a console, it should ideally detach from
it rather than polluting the console with random garbage output (like
e.g. kate does on Linux). In any case, it must not rely on the presence
of a console.
A _console_ application however must not use the GUI at all. That is, it
should also run in a SSH session without requesting a display.
So, talking Qt, a console application probably uses only
QCoreApplication, while the GUI application uses QApplication - and
there we are with _two_ applications...
... and back to the thread's subject: (MS) Windows GUI applications do
not use a console, fullstop. If you want Linux behavior, run Linux... ;-)
Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth
--
Tel.: +49 (0)711 22 88-10 * Fax: +49 (0)711 22 88-111
Web: http://www.trimble.com/geospatial/ * http://www.inpho.de/
Trimble Germany GmbH * Branch office Stuttgart
Smaragdweg 1 * 70174 Stuttgart * Germany
Commercial register: HRB 83893, Darmstadt
Managing Directors: Dr. Frank Heimberg, Hans-Jürgen Gebauer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6050 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110413/2612858f/attachment.bin
More information about the Qt-interest-old
mailing list