[PyKDE] ANNOUNCING PyQwt-sip34_20020807 - some problems on Win32

Gerard Vermeulen gvermeul at grenoble.cnrs.fr
Thu Sep 19 10:07:01 BST 2002

Hi Peter

On Wed, Sep 18, 2002 at 07:07:54PM -0700, Peter Lipa wrote:

[ snip]
> I only had to uncomment the two lines:
>             # is this true?
>             qt_library_name = 'qt-mt305'
>             extra_version = '-Qt-305'
> in the pyqt_support.py (yes, you guesset trolltech's naming convetion
> correctly on windows)
I guess Thane pointed it out, already.
> I am happy to send you the the binary PyQwt windows installer and zip builds
> for the Qt3.0.5 commercial if you want to put them on your website.
> For a binary-only release, according the the commercial qt license,  I see
> no problem with sending you also the qt-mt305.dll (without the souce of
> course) so you can run and test the commercial version of the  win32 PyQwt
> package yourself.
Of course, but let's fix your runtime problems first.
> Questions/Suggestions for the build scripts:
> 1) Could you make the qt_library_name and  extra_version  variables in the
> first lines of the  setup.py (as you did with the python dir etc.)?
> Just for having all in one place....
Yes, I can simplify pyqt_support (mostly for Windows, it is much easier to
find system information on Unix). 
> 2) The setup setup.py bdist or python setup.py bdist_wininst don't put all
> the new stuff (incluing PyCute.py !!) into the binary installer exe or zip
> files.
> So people downloading the binary installer don't get the benefit of your
> latest and cutest work - PyCute!
PyCute does not work with Qt-2.??, I left it out because there is no way
of testing it. 
> Problems:
> The last working version  (except PyQwt printing in the examples) on my dev
> machine was Qt3.0.4, PyQt 3.3 and your
> previous PyQwt version. Now I upgraded to Qt3.0.5, PyQt 3.3.2 (and
> corresponding sip) and your current PyQwt-sip34_20020807. We don't have
> the new commercial PyQt 3.4 yet (and wait till Qt 3.1 is released for the
> next major upgrade cycle) so we are stuck for now with the latest
> pre-commercial
> PyQt 3.3.2 version.
> At runtime, it appears that all examples that don't redraw the QCanvas (i.e.
> the one with a draw-once static plot) have EMPTY canvases  (even after
> resizing or minimizing). The axes, ticks and titels are all drawn, but the
> drawing area within the axis is in plain background color with no curvers,
> markers or gridlines.(
> In the BodeDemo.py one can choose another Damping Factor and then the
> interior gets redrawn and shows up fine on the sreen. The examples that get
> never redrawn (SimpleDemo.py, plot.py and BodeDemo.py at first startup) have
> empty axes interiors. Strangely, the CurveDemo1.py works fine (guess there
> are no axes per se). In the cmd window I get  a sequence of messages :
> QPainter::begin: Another QPainter is already painting this device;
>         A paint device can only be painted by one QPainter at a time
>  All this happens running with or without the PyCute shell!
> I tried this on 2 independent machines and get the same behavior.
> Do you have any idea what the problem might be ??
> (I am sure I am linking to the correct Qt dll - have only one in my path;
> all PyQt3.3.2 demos and example are working fine)!
I suspect that it is a problem with the Qwt snapshot. I noticed the
pecularities with BodeDemo.py on Windows and ascribed this to a bad
interaction with Qt-2.3.0-NC, but it seems a Windows problem.

(1) you can check if it is a Qwt problem by building the Qwt C++
    library, and running the examples.

(2) possible workaround:
    - delete the 'sip' and 'qwt-20020807' directories in the new distribution
    - copy the 'sip' and 'qwt-0.4.1' directories from the previous distribution
      to the new one
    - rename the 'qwt-0.4.1' directory to 'qwt-20020807'
    - remove the 'build' directory
    - python setup.py bdist_winst

    Now, you can use the new commercial PyQt-3.4 with the old Qwt-0.4.1.

I will try to solve the QCanvas problem (none of the Qwt developers
uses Windows) or ask the Qwt mailing list.

Thanks -- Gerard

More information about the PyQt mailing list