[PyKDE] PyQwt binding [Was:] How to do *INTERACTIVE* plotting with PyQt (or PyQwt)

Gerard Vermeulen gvermeul at grenoble.cnrs.fr
Tue Sep 10 09:28:00 BST 2002


Hi Hans-Peter, 

thanks for advertising PyQwt and your remarks
 
On Mon, Sep 09, 2002 at 11:38:47PM +0200, Hans-Peter Jansen wrote:
> A few remarks:
> 
> after commenting out a few lines in pyqt_support.py, I was able to build it 
> with a current PyQt snapshot version. Not a problem here, maybe a command 
> line switch to suppress these tests would be nice.
> 
>         #if not (sip_version == '3.3.2'):
>         #    raise SystemExit, 'sip-3.3.2 required to build this PyQwt'
>         import qt
>         #pyqt_version = qt.PYQT_VERSION
>         #if not pyqt_version == '3.3.2':
>         #    raise SystemExit, 'PyQt-3.3.2 required to build this PyQwt'
> 
This is self-defense: sip is a moving target and it is impossible to
support all versions of sip/PyQt. The check for a matching sip/PyQt may be
overkill with PyQt's new build system.
>
> BodeDemo.py:
> 
> the damping factor QwtCounter buttons looks different in the c++ version:
> while the arrow buttons in c++ are nearly quadratic, they span the full
> toolbar size (looks ugly). In both versions, the embedded QTextEdit is
> a bit to narrow. Trying to resize() the widget failed. Any ideas? Looks 
> like QwtCounter class is missing a reimplemented resize method.
>
Yes, it is ugly. I will check if a missing resize() is Qwt's or PyQwt's fault. 
>
> In order to get printing to work, I had to remove the call to QwtFltrDim:
> 
>     def printPlot(self):
>         p = QPrinter()
>         if p.setup():
>             #self.plot.printPlot(p, QwtFltrDim(200))
>             self.plot.printPlot(p)
>
Thanks, QwtFltrDim & friends are obsolete in Qwt-0.4.1 
>
> CPUloadDemo.py:
> 
> Running this demo, I was a bit disappointed (kidding). Maybe you want
> to try to apply the attached patch. I think, it's more like an average 
> linux user expect it to appear. I hope, it fits your expectations, too.
>
Thanks for finishing the demo. 

The bugs are being fixed. If my Python interpreter widget (it really boosts
the usefulness of PyQwt), I will release a new version of PyQwt.

Gerard




More information about the PyQt mailing list