[PyQt] order of flags significant in coercing

Benoît HERVIER khertan at khertan.net
Tue Sep 14 09:02:08 BST 2010


Thanks!

2010/9/13 Phil Thompson <phil at riverbankcomputing.com>:
> On Wed, 8 Sep 2010 14:56:00 +0200, "Hans-Peter Jansen" <hpj at urpla.net>
> wrote:
>> Hi Phil,
>>
>> there's an issue with the order of flags when coercing to int for e.g.
>> QPainter.paintText():
>>
>>>>> from PyQt4.QtCore import *
>>>>> type(Qt.AlignLeft|Qt.TextWordWrap|Qt.AlignTop)
>> <class 'PyQt4.QtCore.Alignment'>
>>>>> type(Qt.AlignLeft|Qt.AlignTop|Qt.TextWordWrap)
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>> TypeError: unsupported operand type(s) for |: 'Alignment' and 'TextFlag'
>
> Should be fixed in tonight's PyQt snapshot.
>
> Thanks,
> Phil
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Benoît HERVIER, Khertan Software - http://khertan.net/


More information about the PyQt mailing list