Quote Originally Posted by arcull View Post
thanks yeye_olive, the solution you describe looks a bit complicated for my current level of knowledge in c++ and qt, however the idea of having a second thread for invoking external lib would probably be simpler or at least better, I've done something like that once in Java, but I have to refresh/check how the principle how that works.
Actually the solution I outlined in my previous post assumed that the library calls were executed in the main (GUI) thread; the other thread is only needed to read from the pipe while the library writes to it through stdout. The thread does not even need to be visible outside of the logging mechanism.

Quote Originally Posted by arcull View Post
if I redirect display of stdout to file in second thread, do I still have normal stdout in first (main) thread?
Unfortunately, the answer is no. stdout is a process-wide stream. It would be great if the library were able to write to a custom logger instead of stdout; you could then implement a logger that would append the text to your widget. If you need a separate stdout for the rest of your program, then I am afraid your only option is to spawn a process that will execute the library calls on your behalf.