【问题标题】:How to embed matplotlib canvases in a PySide2 application如何在 PySide2 应用程序中嵌入 matplotlib 画布
【发布时间】:2018-08-26 20:59:31
【问题描述】:

我正在尝试将 matplotlib 画布嵌入到 PySide2 应用程序中。我试过用这个例子:https://matplotlib.org/examples/user_interfaces/embedding_in_qt5.html

该示例使用 PyQt5 运行良好。但是,如果我将第 19 行从

from PyQt5 import QtCore, QtWidgets

进入

from PySide2 import QtCore, QtWidgets

然后 Python 崩溃并显示该消息

致命的 Python 错误:释放无

应用程序窗口一关闭。有没有办法使用 PySide2 让它正常工作?

【问题讨论】:

    标签: python matplotlib pyside2


    【解决方案1】:

    原来这是 PySide2 中的一个错误,现在已修复(参见 https://bugreports.qt.io/browse/PYSIDE-632?gerritReviewStatus=All)。只需更新到最新版本即可解决此问题。

    【讨论】:

      猜你喜欢
      • 2022-01-02
      • 1970-01-01
      • 1970-01-01
      • 2011-04-03
      • 1970-01-01
      • 1970-01-01
      • 2015-02-17
      • 1970-01-01
      • 2013-07-04
      相关资源
      最近更新 更多