def __init__(self, requestedImType='img'): """ :param string requestedImType: The type of image to return to the QT interface (one of ['img', 'pixmap']) """ if requestedImType == 'img': imType = QQuickImageProvider.Image elif requestedImType == 'pixmap': imType = QQuickImageProvider.Pixmap else: raise NotImplementedError('Unknown type: {}'.format(requestedImType)) QQuickImageProvider.__init__(self, imType)
def __init__(self): QQuickImageProvider.__init__(self, QQuickImageProvider.Image)
def __init__(self, model): QQuickImageProvider.__init__(self, QQuickImageProvider.Pixmap) self.model = model