[PyKDE] Undocumented shortcommings of QWMatrix

myrkraverk at users.sourceforge.net myrkraverk at users.sourceforge.net
Tue Sep 2 04:37:00 BST 2003


Hello,

I'm relatively new to python, but not Qt as such.  When I was going
through the Qt tutorial, the 14 steps, I came across some
shortcommings for QWMatrix, and not all of them documented on the web
page.

Before I go any further, I'm going to state that my version of python
is 2.3, PyQt is 3.8 and Qt is 3.2.1.

It is not possible to use the new mapRect() method of QWMatrix, but
map() works for QRect, but is obsolete, this should at least be
documented.

Other shortcommings of QWMatrix is the lack of the * operator, a very
commonly used operator when dealing with matrices, I did not try + but
it should be working.  Again, these shortcommings are only
semi-documented as it's only meantioned that the ==, != and *=
operators work.

Another mis-feature of QWMatrix is that the invert() method does not
work as one would expect.  It is impossible to use an inverted matrix
again with Qt as it's a tuple, which to me, is useless.  I recommend
that this will be fixed, at least with a constructor that can create a
QWMatrix from that tuple.

I went mathematical and worked around this shortcommings when doing
part 14 of the tutorial.  If anyone is interested I could publish the
code, and even translate the entire tutorial into python.  I already
have most of the chapters in more or less line by line compatible code
with the text of the tutorial.


Best,

Johann

-- 
Sometimes I do not think at all!  Does that mean I don't exist
in the mean time?




More information about the PyQt mailing list