在 PySide6 中使用 GraphicalEffects

Aar*_*ron 5 qt qml pyside2 qt6 pyside6

我正在使用 PySide6 并尝试使用 GraphicalEffects 模块。

根据此处的文档: https: //doc.qt.io/qt-6/qtgraphicaleffects5-index.html

我在做:

import Qt5Compat.QtGraphicalEffects
Run Code Online (Sandbox Code Playgroud)

我收到的错误:

"Qt5Compat.QtGraphicalEffects" is not installed
Run Code Online (Sandbox Code Playgroud)

我如何安装这个模块?我的 Linux 机器上安装了 PySide6.2.2.1。

ניר*_*ניר 2

从 pypi 安装时这是一个已知问题。它将在 pyside 6.4 中修复。

您还可以从源代码构建,如果您使用 Qt 在线安装程序安装它,它将自动添加。