[PyQt] QGraphicsItem missing method
phil at riverbankcomputing.com
Sun Apr 18 08:26:52 BST 2010
On Sat, 17 Apr 2010 20:02:50 -0600 (MDT), buddy+pyqt at nmt.edu wrote:
>> On Sat, 17 Apr 2010 12:27:51 -0600 (MDT), buddy+pyqt at nmt.edu wrote:
>>> I recently updated from 4.7 to 4.7.3 and suddenly the QGraphicsItem
>>> no longer
>>> seems to have a setOpacity method. The documentation still indicated
>>> should be
>>> a valid method. In addition I noticed that the
>>> attribute is also missing from the QGraphicsItem class.
>>> Attached is some test code I have featuring has a class called
>>> inherits from QGraphicsItem and attempts to call setOpacity in it's
>>> When I run it I get the following errror:
>>> Traceback (most recent call last):
>>> File "./test.py", line 63, in <module>
>>> File "./test.py", line 13, in __init__
>>> AttributeError: 'CustomItem' object has no attribute 'setOpacity'
>>> Please let me know if I somehow have a bad installation or if there's
>>> something I
>>> can do to fix this.
>> Works fine for me.
>> Make sure you aren't using an older version of Qt.
> I was using Qt 4.6.0. I'll upgrade to the 4.7.0 preview, reinstall PyQt
> 4.7.3 and
> try again.
4.6.0 should be fine. 4.7.0 isn't supported.
More information about the PyQt