'Function to handle difficult examples
Update on each object'

def btnstate(self, item=None):

    if (not self.canvas.editing()):
        return
    item = self.currentItem()
    if (not item):
        item = self.labelList.item((self.labelList.count() - 1))
    difficult = self.diffcButton.isChecked()
    try:
        shape = self.itemsToShapes[item]
    except:
        pass
    try:
        if (difficult != shape.difficult):
            shape.difficult = difficult
            self.setDirty()
        else:
            self.canvas.setShapeVisible(shape, (item.checkState() == Qt.Checked))
    except:
        pass
