We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0930175 commit 678d683Copy full SHA for 678d683
src/models/page.py
@@ -1,5 +1,12 @@
1
+import logging
2
+
3
from PySide6.QtGui import QImage, QPixmap
4
5
+from src.models.constants import LOGGING_VERBOSITY
6
7
+logger = logging.getLogger(__name__)
8
+logger.setLevel(LOGGING_VERBOSITY)
9
10
11
class Page:
12
"""
@@ -33,8 +40,13 @@ def getPixmap(self):
33
40
# and convert it to a QPixmap
34
41
image = QImage()
35
42
43
+ logger.debug("Loading image from data")
44
36
45
if image.loadFromData(self._data):
37
46
self._pixmap = QPixmap.fromImage(image)
47
+ logger.debug("Image loaded successfully")
48
+ else:
49
+ logger.error("Failed to load image from data")
38
50
39
51
return self._pixmap
52
0 commit comments