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 (
|
from qt.core import (
|
||||||
QApplication, QCheckBox, QDialog, QDialogButtonBox, QHBoxLayout, QIcon, QImage,
|
QApplication, QCheckBox, QDialog, QDialogButtonBox, QHBoxLayout, QIcon, QImage,
|
||||||
QLabel, QPainter, QPalette, QPixmap, QScrollArea, QSize, QSizePolicy,
|
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
|
from calibre import fit_image
|
||||||
@ -18,6 +18,7 @@ from calibre.gui2 import (
|
|||||||
|
|
||||||
|
|
||||||
def render_svg(widget, path):
|
def render_svg(widget, path):
|
||||||
|
from qt.core import QSvgRenderer
|
||||||
img = QPixmap()
|
img = QPixmap()
|
||||||
rend = QSvgRenderer()
|
rend = QSvgRenderer()
|
||||||
if rend.load(path):
|
if rend.load(path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user