1
0

Merge pull request #8881 from accumulator/qobject_test

add a simple test framework for testing QObjects and their signal/slot mechanism
This commit is contained in:
ghost43
2024-02-15 14:46:50 +00:00
committed by GitHub
6 changed files with 244 additions and 1 deletions

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