[PyKDE] Deleting QCanvasItems

Phil Thompson phil at riverbankcomputing.co.uk
Tue Jun 17 14:29:01 BST 2003


On Tuesday 17 June 2003 9:48 am, Dustin Vink wrote:
> Is there a better way of deleting QCanvasItems?
>
> def erase(self):
> 	trash = QCanvas()
> 	for item in self.canvas.allItems(): item.setCanvas(trash)
> 	self.canvas.update()

See the FAQ.

Phil




More information about the PyQt mailing list