'Must be called in the GUI thread'

def __getitem__(self, key):

    with self.lock:
        self.clear_staging()
        ans = self.items.pop(key, False)
        if (ans is not False):
            if (type(ans) is QImage):
                ans = QPixmap.fromImage(ans)
            self.items[key] = ans
    return ans
