你好,我想嵌入一个将Matplotlib与PyQt5一起使用的图
我尝试过这个:
self.figure = plt.figure()
self.canvas = FigureCanvas(self.figure)
self.tab1.layout.addWidget(self.canvas)
但是我遇到了错误:addWidget(self, QWidget, stretch: int = 0, alignment: Union[Qt.Alignment, Qt.AlignmentFlag] = Qt.Alignment()): argument 1 has unexpected type 'FigureCanvasTemplate'
我精确的是tabs1
:
self.tabs = QTabWidget()
self.tab1 = QWidget()
self.tabs.addTab(self.tab1, "About")
能帮我吗?
非常感谢您!