Buenos dias estoy tratando de mostrar un grafico en una qlabel con pixmap y pygal, sin embargo no funciona me lanza un error qn QPixmap
from PyQt5 import QtCore, QtWidgets, QtSvg
import pygal
from PyQt5 import uic
from PyQt5.QtGui import QPixmap
class Principal(QtWidgets.QMainWindow):
def __init__(self):
QtWidgets.QMainWindow.__init__(self)
uic.loadUi("1.ui",self)
svg_widget = QtSvg.QSvgWidget()
bar = pygal.Histogram()
bar.add("Tabla", [1,2,3,4,5,6,7,8])
data = bar.render()
svg_widget.load(data)
pixi = QPixmap.fromImage(svg_widget)
self.label.setPixmap(pixi)
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
p = Principal()
p.show()
p.resize(900,600)
sys.exit(app.exec_())