I am using PyQt.

I am adding QPolygonF to it and adding my own data to each class as:

Qt Code:
  1. polygon.data = ownData
To copy to clipboard, switch view to plain text mode 

Python allows dynamic binding so I can do it. I later want to query for items that lie within the given rectangle using items() method and check the items in the returned list for "data" I get AttributeError. Does addPolygon() only draws and not stores the items?