On 20 March 2014 18:39, Dirk Hohndel <[email protected]> wrote:
> On Thu, 2014-03-20 at 12:26 +0200, Lubomir I. Ivanov wrote:
>> >
>> >> well, technically, the fact that stdout and stderr go into the abyss
>> >> for GUI apps, doesn't mean we *can't* pipe them where we want to.
>> >> i simply didn't understand the need for it. i guess i can be useful to
>> >> gather debug information from users, if instructed to pass an extra
>> >> argument.
>> >>
>> >> 1) we add the -win32console command line argument that is a NOP on
>> >> other platforms
>> >> 2) users can add it when calling the exe from the terminal or from a
>> >> desktop shortcut
>> >> 3) it pipes our output to a dedicated terminal (created on the fly) or
>> >> to the starting terminal process
>
> Yes, except don't pipe it to a terminal but instead into a
> QMessageWindow or something like that.
>

but wouldn't that defeat the original idea of showing the --help
commands in the console?
c:\subsurface\subsurface.exe --help
<outputs in the terminal and exits>

for --help, --version, exit(1) is called, and the UI is never reached.

also, i don't really see the need to write to a Qt widget since the
stdout/stderr will be for "advanced" user only and a terminal will
suffice anyhow?
(even Blender on Windows uses that)

here is some info on the Qt widget piping subject, but it doesn't look
portable (Qt5 or later):
http://blog.debao.me/2013/07/redirect-current-processs-stdout-to-a-widget-such-as-qtextedit/

lubomir
--
_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to