Hi RM:

Congratulations on how far you have been able to get with Qt5 so far!
I am most impressed.  Following up should be straightforward.  See
comments in context below.

On 2014-03-14 13:45-0500 RM wrote:

> Hi Alan,
> 
> I tried with your latest code.  Some issues:
> 
> I'm interpreting your last post as meaning all I need to do is use 
> -DPLPLOT_USE_QT5=ON and the QPrinter problems should go away.
>  Unfortunately this isn't the case yet.  In qt.h, the #include <QPrinter> 
> directive (line 62)  needs to be protected by the macro,
> otherwise the compiler attempts to include it and can't find it with Qt5.  
> So, as a quick hack, I moved it down to line 213, inside the
> #ifdef.
> 
> This gets slightly further, but doesn't entirely work, perhaps because of the 
> || clause in the #if statement. 
> #if defined ( PLD_epsqt ) || defined ( PLD_pdfqt )
> 
> I had to turn off both PS and PDF to make it past this issue:

I don't understand the qt.h code that well, but perhaps Andrew or
Hazen can figure out the correct use of the PLD_epsqt (and PLD_pdfqt)
macros to solve this issue so you don't have to disable the pdfqt
device as well.

> 
> cmake28 -DPLPLOT_USE_QT5=ON -DCMAKE_PREFIX_PATH=/opt/qt5.2.1_x64/ 
> -DPLD_epsqt=OFF -DPLD_pdfqt=OFF
> -DCMAKE_INSTALL_PREFIX=/opt/plplot5.10.0 ..

Good choice to bypass the issue for now with -DPLD_pdfqt=OFF. 
-DPLD_epsqt=OFF should not be needed any more since that happens by
default for -DPLPLOT_USE_QT5=ON.

> 
> Then, compile made it all the way down to here:
> 
>  [ 30%] Generating test_dyndrivers_dir/qt.driver_info
> Could not open driver module 
> /home/Downloads/plplot-latest/plplot-code/PLPLOT-BUILD/drivers/qt
> libltdl error: file not found
> make[2]: *** [drivers/test_dyndrivers_dir/qt.driver_info] Error 1
> make[1]: *** [drivers/CMakeFiles/test_qt_dyndriver.dir/all] Error 2
> make: *** [all] Error 2
> 
> I don't understand this error -- but there's an issue of some sort.  In any 
> event, I ran make a second time, and it suddenly ran all the
> way to the end.  make install worked as well.

This is a "head-scratcher" bug that appears on certain Windows
platforms that we have never been able to figure out.  The simple code
that checks dynamic loading of the qt device driver sometimes fails on
Windows, but that same dynamic loading succeeds for the equivalent
PLplot library code!  Go figure....  The workaround is to skip the
simple check by adding the cmake option -DTEST_DYNDRIVERS=OFF.

> Off-hand, I don't have any code to test the qt library, and this is 
> essentially my first time compiling plplot from scratch, so I'm
> unfamiliar with the build system.  Is there a qt example I can run against 
> it?  I couldn't find where the examples built in the build
> directory.

Add the cmake option -DBUILD_TEST=ON.  Then directly after you run
cmake (no need to do "make" or "make all" first since all necessary
dependencies are taken care of by the following commands), do this simple test.

# Build the first C example:
make x01c

# Build the qt device driver
make qt

# ESSENTIAL for Windows: Put the dll subdirectory of the top-level
directory of the # build tree (i.e., where all the dll's are located)
on # your PATH.  For bash.exe I would do that as follows:

PATH=$(pwd)/dll:$PATH

where $(pwd) contains the absolute PATH of the top-level directory of
the build tree.

# Run x01c with one of the qt devices.
examples/c/x01c

You should get a choice of a long list of qt-related devices.  Pick
one of them.  If qtwidget is available use that. Otherwise use a
file-related device, e.g., svgqt.  For the file-related case you will
also be prompted for the output filename.

You can do all of this on the command line once you know what
qt devices are available on your platform.  For example,

examples/c/x01c -dev qtwidget
examples/c/x01c -dev svgqt -o test.svg

For the svg case you will need to use some svg display software to see
the test.svg results that are output by the above command.  For
example, the firefox browser should handle display of an svg file
without issues.  You will also require display software to check
results for the other file-related qt devices.

If you have the MSYS bash.exe application on your PATH, you can also
do a much more comprehensive check of the qt devices as follows:

make test_all_qt >& test_all_qt.out

Subsequently, you should look in test_all_qt.out for any error
messages from this comprehensive test.

I hope the simple test of the qt device driver I demonstrated above as
well as the comprehensive test of that device driver (if you have
bash.exe from MSYS on your PATH) both give you excellent results with
Qt5.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to