fix svg.setResolution(int) deprecation warning
triggered only for PyQt binding, Python 3.8, 3.9 there is a mismatch in API: - QScreen.logicalDotsPerInchX() -> float - QSvgGenerator.setResolution(int)
This commit is contained in:
parent
321b5e627a
commit
310afebe56
@ -199,7 +199,7 @@ def _generateItemSvg(item, nodes=None, root=None, options={}):
|
||||
svg = QtSvg.QSvgGenerator()
|
||||
svg.setOutputDevice(buf)
|
||||
dpi = QtGui.QGuiApplication.primaryScreen().logicalDotsPerInchX()
|
||||
svg.setResolution(dpi)
|
||||
svg.setResolution(int(dpi))
|
||||
|
||||
p = QtGui.QPainter()
|
||||
p.begin(svg)
|
||||
|
Loading…
Reference in New Issue
Block a user