def _showPixmap(self, pixmap): ''' @param: pixmap QPixmap ''' pixmap.setDevicePixelRatio(self.devicePixelRatioF()) scene = QGraphicsScene(self._ui.mediaPreview) if pixmap.isNull(): scene.addText(_('Preview not available')) else: scene.addPixmap(pixmap) self._ui.mediaPreview.setScene(scene)
def _showLoadingText(self): scene = QGraphicsScene(self._ui.mediaPreview) scene.addText(_('Loading...')) self._ui.mediaPreview.setScene(scene)