【问题标题】:PyQt5 and QtQuickPyQt5 和 QtQuick
【发布时间】:2014-07-06 08:57:10
【问题描述】:

当我尝试运行 PyQt5\examples\quick\tutorials\extending\chapter1-basics 文件夹中的 PyQt5 QtQuick 示例时,我收到此错误:

QQmlExpression: Expression file:///(...)/example.qml:17:15 depends on non-NOTIFYable properties:  
    PieChart::name  
class QWindowsEGLStaticContext *__cdecl QWindowsEGLStaticContext::create(void): Could not initialize egl display: error 12289  

QtQuick: failed to create OpenGL context

我必须配置一些东西来运行这个例子吗?

【问题讨论】:

  • 你安装了opengl吗?您是否使用了包含 qtopengl 的标准 pyqt 安装?
  • 不,我没有安装opengl。我使用了来自 Riverbankcomputing 的二进制包。你能解释一下我必须安装什么才能让它工作吗?

标签: python-3.x pyqt


【解决方案1】:

尝试安装DirectX Runtime,重新启动并再次启动脚本。在某些情况下,PyQt QtQuick 需要在 Windows 上正常工作。

【讨论】:

  • 难以置信,它成功了!我永远不会想到这可能是问题,但似乎 OpenGL 实际上是在 MS Windows 中的 DirectX 之上实现的。但是为什么这失踪了……奇怪。
猜你喜欢
  • 2016-03-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多