Esempio n. 1
0
 def find_itemAt(self, pos):
     items = self.items(
         QtCore.QRectF(pos - QtCore.QPointF(1, 1), QtCore.QSizeF(3, 3)))
     for item in items:
         if isinstance(item,
                       QGraphicsItem) and not isinstance(item, Connection):
             return item
     return None
Esempio n. 2
0
 def itemAt(self, pos):
     items = self.scene.items(
         QtCore.QRectF(pos - QtCore.QPointF(DB, DB),
                       QtCore.QSizeF(2 * DB, 2 * DB)))
     for item in items:
         if isinstance(item, QGraphicsItem):
             return item
     return None