GraphicsScene.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:NeoAnalysis 作者: neoanalysis 项目源码 文件源码
def selectedItems(self, *args):
        items = QtGui.QGraphicsScene.selectedItems(self, *args)
        ## PyQt bug: items() returns a list of QGraphicsItem instances. If the item is subclassed from QGraphicsObject,
        ## then the object returned will be different than the actual item that was originally added to the scene
        #if HAVE_SIP and isinstance(self, sip.wrapper):
            #items2 = []
            #for i in items:
                #addr = sip.unwrapinstance(sip.cast(i, QtGui.QGraphicsItem))
                #i2 = GraphicsScene._addressCache.get(addr, i)
                ##print i, "==>", i2
                #items2.append(i2)
        items2 = list(map(self.translateGraphicsItem, items))

        #print 'items:', items
        return items2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号