[This SVG image在Firefox和Inkscape中正确渲染,但是由于某些原因,当使用没有任何花哨的QGraphicsSVGItem
时,它以这种方式呈现:
如您所见,卡的背面不应超出白色边框。
我做错什么了吗?是否有(最好是简单的)修复程序?
MWE:
import sys
from PyQt5 import QtWidgets, QtCore, Qt, QtGui
app = QtWidgets.QApplication(sys.argv)
scene = QtWidgets.QGraphicsScene()
scene.addItem(Qt.QGraphicsSvgItem("back-red.svg"))
graphics_view = QtWidgets.QGraphicsView()
graphics_view.setScene(scene)
graphics_view.show()
sys.exit(app.exec())
[此SVG图像已在Firefox和Inkscape中正确渲染,但是由于某些原因,当使用没有任何花哨的QGraphicsSVGItem时,它会以这种方式呈现:供参考,这是它的样子……
python -m pip install pyqtwebengine
):