1
0

stub QVideoSink import as it requires many dependencies but isn't used on android currently

This commit is contained in:
Sander van Grieken
2024-02-12 11:32:17 +01:00
parent 71dbf76cd0
commit 3582c79160

View File

@@ -10,7 +10,13 @@ from PIL import ImageQt
from PyQt6.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject, QRect
from PyQt6.QtGui import QImage, QColor
from PyQt6.QtQuick import QQuickImageProvider
from PyQt6.QtMultimedia import QVideoSink
try:
from PyQt6.QtMultimedia import QVideoSink
except ImportError:
# stub QVideoSink when not found, as it's not essential on android
# and requires many dependencies when unit testing.
# Note: missing QtMultimedia will lead to errors when using QR scanner on desktop
from PyQt6.QtCore import QObject as QVideoSink
from electrum.logging import get_logger
from electrum.qrreader import get_qr_reader