[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] PyQt4 Update
From: Baz Walter <bazwal () ftml ! net>
Date: 2005-12-05 0:33:41
Message-ID: 200512050033.41414.bazwal () ftml ! net
[Download RAW message or body]
On Sunday 04 Dec 2005 14:01, Phil Thompson wrote:
> On Saturday 03 December 2005 6:08 pm, Baz Walter wrote:
> >
> > Hello Phil
> >
> > I've created a PyQt4 port of the tetrix example from Qt v4.x, which is
> > attached. It's not been tested to destruction, but almost everything
> > seemed to work okay for me. The only very minor issue I came across was
> > the following error when trying to pass Qt.AlignCenter to
> > QLabel.setAlignment:
> >
> > TypeError: argument 1 of QLabel.setAlignment() has an invalid type
> >
> > type(Qt.AlignCenter) gives <class 'PyQt4.QtCore.AlignmentFlag'> but the
> > Qt docs suggest it should be of type Qt.Alignment. Anyway, it can be
> > easily fixed by ORing together Qt.AlignVCenter and Qt.AlignHCenter.
>
> Thanks. The setAlignment() bug will be fixed in the next snapshot.
>
> Phil
After some further playing around with the tetrix example I have found another
fairly minor issue which picks up on some points made later in this thread.
There are some functions in the QPainter class which have a const QBrush
argument but which can take a QColor due to an implicit QBrush(color)
conversion. They all seem to work with the exception of this one:
QPainter.fillRect(int x,int y,int w,int h,const QBrush & brush)
When passed a QColor, this fails with "TypeError: argument 5 of
QPainter.fillRect() has an invalid type" followed by a segmentation fault
(sometimes). Of course, this can be cured with an explicit conversion.
(NB: I also back-ported the tetrix example to Qt3 and got the same error).
Regards
--
Baz Walter
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic