def getSceneObj(self, items): scene = TaurusGraphicsScene(self.myparent) for item in items: try: if isinstance(item, Qt.QWidget): scene.addWidget(item) elif isinstance(item, Qt.QGraphicsItem): scene.addItem(item) except: self.warning("Unable to add item %s to scene" % str(item)) self.debug("Details:", exc_info=1) return scene
def getSceneObj(self,items): scene = TaurusGraphicsScene(self.myparent) for item in items: print "\n item w getsceneobject: ", item try: if isinstance(item, Qt.QWidget): print "\n instance of ", item, " = Qt.QWidget" #scene.addItem(item) scene.addWidget(item) elif isinstance(item, Qt.QGraphicsItem): scene.addItem(item) #else: # scene.addItem(item) except: self.warning("Unable to add item %s to scene" % str(item)) self.debug("Details:", exc_info=1) return scene
def getSceneObj(self, items): scene = TaurusGraphicsScene(self.myparent) for item in items: print "\n item w getsceneobject: ", item try: if isinstance(item, Qt.QWidget): print "\n instance of ", item, " = Qt.QWidget" #scene.addItem(item) scene.addWidget(item) elif isinstance(item, Qt.QGraphicsItem): scene.addItem(item) #else: # scene.addItem(item) except: self.warning("Unable to add item %s to scene" % str(item)) self.debug("Details:", exc_info=1) return scene