[reportlab-users] PyQt Visual Editor
Rajeev Joseph Sebastian
rajeev_jsv at dinamis.com
Sat Nov 26 05:38:47 EST 2005
Hello all,
After thinking a bit on the Visual editor, and the requirements of its core
engine, I realised that one doesn't need pygtk/cairo or whatever to do this
job: after all, we have a perfectly good graphics library ourselves -
reportlab.graphics :)
So taking this further, in about 5 minutes, I was able to come up with this
screenshot (attached).
It shows a PyQt window, rendering a couple of example taken from the Graphics
guide.
I have also attached the code with this email. You can see, it is quite
simple: a hallmark of the Qt library and especially PyQt. I couldn't say the
same for any of the other GUI toolkits available for Python. So far, I have
made commercial applications using wxPython, PyGTK and PyQt and I must say,
PyQt is absolutely the best of the lot.
There is also an issue of licensing: PyQt is available only under 2 licenses:
GPL and a paid commercial license. But it is well worth it. PyQt is also
available for a majority of OS, and as you may know, Qt's strengths is its
graphics capabilities (as evidenced by the various customer success stories
on Trolltech's website [1]).
I'm sure of the calm surprise and great relief you felt when you met Python
and especially realised how fast it is to code with it. Two years after using
wxPython, I got exactly the same feeling when I started with PyQt.
(Of course, I may be biased: I have a huge commercial database application
written purely in PyQt, along with SQLObject, RL, my hacked version of trml
(Tiny RML), etc. )
Also, it is possible to run this example on Windows [2].
(Btw, when running this application, I had to comment out line 80 of
renderPM.py. I guess I don't have the fonts necessary to use this library.
How can I get those fonts and where do I install it ?)
[1] http://www.trolltech.com/success/index.html
[2] http://www.quadgames.com/download/pythonqt/
--
Rajeev J Sebastian
Dinamis Corporation
3266 Yonge Street, Suite 1419
Toronto, ON
Canada M4N 3P6
+1 416-410-3326
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snapshot10.png
Type: image/png
Size: 130962 bytes
Desc: not available
Url : http://two.pairlist.net/pipermail/reportlab-users/attachments/20051126/ca6c5c49/snapshot10-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_paintdevice.py
Type: application/x-python
Size: 1363 bytes
Desc: not available
Url : http://two.pairlist.net/pipermail/reportlab-users/attachments/20051126/ca6c5c49/test_paintdevice-0001.bin
More information about the reportlab-users
mailing list