From: Bastian M. <bma...@we...> - 2014-02-11 08:21:48
|
Triggered by the current discussion, I tried to build the qt terminal on Windows using two configurations: MSVC 2008 and Qt 4.8.5 (binary), and MSVC 2012 and Qt 5.2.1 (binary). In both cases, I replaced the waitforinput code by getchar(): if (options != TERM_ONLY_CHECK_MOUSING) return getchar(); else return NUL; Otherwise I would get error messages like this: "Qt terminal communication error: select() error 0 No error". But this was expected as discussed in http://sourceforge.net/p/gnuplot/patches/645/ I did not yet test Jérôme's proposed solution, though. Also, I had to apply the "C89" patch which can be found at http://sourceforge.net/p/gnuplot/patches/484/ The behaviour of the result seems to be similar to that on Mac: Without changes, gnuplot_qt gets started (once), but gnuplot cycles forever trying to get font info. Adding sleep() after StartDetached() and/or increasing the timeout in qt_connectToServer() helps sometimes, but does not reliably solve the problem. Using Thomas' proposed scheme below, the plot window shows up correctly and I can do `plot`s, but mousing is of course inactive. Bastian Am 07.02.2014 22:03, schrieb Thomas Bleher: > > I don't have a Mac, so I can't test anything, unfortunately. > Two things come to mind that you could look at: > > - Does this happen with the newest version of Qt4? It may be a bug that > has already been fixed. > > - Does it work if you start gnuplot_qt manually? The qt terminal can > connect to already running programs. To do this: > - start gnuplot_qt > - determine its pid > - start gnuplot > - call 'set terminal qt widget "qtgnuplot<pid>"', where <pid> is > replaced by the numerical pid of the gnuplot_qt process > - Try to plot something, e.g. "plot x" > > Hope this helps you. > Thomas > |