【问题标题】:Using GraphicalEffects in PySide6在 PySide6 中使用 GraphicalEffects
【发布时间】:2022-06-23 21:41:16
【问题描述】:

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

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

我在做:

import Qt5Compat.QtGraphicalEffects

我得到的错误:

"Qt5Compat.QtGraphicalEffects" is not installed

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

【问题讨论】:

  • 提供图形效果模块是为了向后兼容 Qt5。您实际上是从 Qt5 移植,还是试图获得图形效果(在 Qt6 中使用着色器)?另外,你需要 QML 或 QWidgets 吗?
  • 我正在将我的项目从 Qt5 重写为 Qt6。我需要它用于 QML,我需要实现的只是 LinearGradient 和 ColorOverlay。
  • 看来需要安装qt6-5compat这个包。
  • 我找不到适用于 Debian 的软件包,仅适用于 Arch linux。
  • Reddit 上也有相同类型的问题

标签: qt qml pyside2 pyside6 qt6


【解决方案1】:

从 pypi 安装时它是 known issue,它将在 pyside 6.4 中修复。

您也可以build from source,它会自动添加

【讨论】:

    猜你喜欢
    • 2021-12-20
    • 2022-12-16
    • 1970-01-01
    • 2021-05-05
    • 2021-09-30
    • 2021-07-17
    • 2021-06-06
    • 2022-01-10
    • 2021-12-26
    相关资源
    最近更新 更多