mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Delay load QSvgRenderer
This commit is contained in:
parent
98a6234414
commit
5c1b2cdb46
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
from qt.core import (
|
||||
QApplication, QCheckBox, QDialog, QDialogButtonBox, QHBoxLayout, QIcon, QImage,
|
||||
QLabel, QPainter, QPalette, QPixmap, QScrollArea, QSize, QSizePolicy,
|
||||
QSvgRenderer, Qt, QTransform, QUrl, QVBoxLayout, pyqtSignal, QAction, QKeySequence
|
||||
Qt, QTransform, QUrl, QVBoxLayout, pyqtSignal, QAction, QKeySequence
|
||||
)
|
||||
|
||||
from calibre import fit_image
|
||||
@ -18,6 +18,7 @@ from calibre.gui2 import (
|
||||
|
||||
|
||||
def render_svg(widget, path):
|
||||
from qt.core import QSvgRenderer
|
||||
img = QPixmap()
|
||||
rend = QSvgRenderer()
|
||||
if rend.load(path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user