Bo Peng wrote:
Hi, Qt experts:

Under windows, configure.py does not display anything unless you start
lyx from a terminal. This can be very confusing, for example, when lyx
starts for the first time, and freezes for 30 min to download and
install miktex packages.

I am thinking that:

1. run configure.py after lyx gets started
2. show a dialog with configure.py stdout output.

The first one should not be very difficult, but I do not know QT well
enough to do the second one. Some goggled piece says something like:

Hook up a QSocketNotifier to your stdout.
Then the QSocketNotifier emits a signal and you connect your slot to it.
In your slot, you do a read on the QSocket to get your data and put it
where ever you want.

I have done something similar to this using QSocketDevice and
QSocketNotifier connected to the stdout.  It worked for me.


Is this enough information for you? I guess we can add a 'showoutput'
flag Systemcall that attachs the command stdout to QSocketNotifier,
and use a very simple dialog to display the output. This is well
beyond my QT knowledge but may be easy for you guys.

We can also use a simple Timer instead but the QSocketNotifier solution
might be more elegant indeed. The simple dialog you are talking about could simply be a QTextEdit.


Note that if QProcess already has something like this, we can use it
to replace Systemcall.

Yes. I think we should replace our homemade process handling with
QProcess. This would have the advantage that stdin/out redirection would
be very easy to do.

Abdel.


Reply via email to