Hazen Babcock wrote: > Hazen Babcock wrote: >> Alan W. Irwin wrote: >>> * I modified pyqt4_test.py a bit so that it would look for the plplot and >>> plplot_pyqt4 extension modules in the correct place. The result was a >>> GUI >>> with nothing plotted but no error messages. I then modified >>> pyqt4_test.py >>> some more to put in some actual plot commands (as part of the >>> initialization which, of course, is not right for the long term), but >>> again I just got a blank GUI with no errors. So there is obviously some >>> more work to do on pyqt4_test.py and possibly plplot_pyqt4.sip to make an >>> example that actually plots more than a blank screen. However, I will >>> leave such further changes to you. I believe all the build system stuff >>> should just work now for you without issues. >>> >>> N.B. it is important that the modules you import with >>> >>> from PyQt4 import QtCore, QtGui >>> >>> in pyqt4_test.py link to the same Qt4 libraries as the plplot_pyqt4 >>> extension module. For my downloaded Qt4.5.1 SDK version of Qt, I arrange >>> that by specifying LD_LIBRARY_PATH appropriately. This is not necessary >>> if plplot_pyqt4.sip is built against the same system Qt4 libraries as >>> QtCore and QtGui point to by default. >>> >>> For both my system Qt4.4 version and the downloadable Qt4.5 version I get >>> the above blank GUI result. >>> >>> I will be most interested to see whether you also replicate the blank GUI >>> for pyqt4_test.py regardless of what plplot commands are used, and, of >>> course, if you have any further build-system questions about the plplotqt >>> library or the plplot_pyqt4 extension module, let me know. >> It now builds for me as well, thanks for all your efforts to get this to >> work! >> >> I confirm the blank plots. This is a little puzzling since the example >> used to work. I'll see what I can do to resolve this. > > Using printf debugging everything appears okay. The example is blank > because the paint method of the ext_qt driver is getting called as > expected. If you resize the window you can see the grey margins, also as > expected. Plplot core calls to "plD_line_qt" are processed. The problem > seems to be that in the function doPlot the plot buffer is empty. I > assume that this driver still works fine for the non-python examples?
Poking around a little more... In the function plD_line_qt we are not getting past this statement: #if defined(PLD_qtwidget) || defined(PLD_extqt) if(widget==NULL) widget=dynamic_cast<QtPLWidget*>((QWidget *) pls->dev); #endif if(widget==NULL) return; So the dynamic cast is not working for some reason? printf(" %ld %ld\n", (long)pls->dev, (long)widget); Suggests that pls->dev is valid, or at least not zero, but that widget is still zero after the cast. -Hazen ------------------------------------------------------------------------------ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel