python - 带有 PyGObject 自省(introspection) Gtk+ 3 的 GenericTreeModel?

标签 python python-3.x gtk3 pygobject treemodel

我正在尝试基于 Python3 中的 GenericTreeModel 编写我自己的 Gtk+3-TreeModel,但出现此错误:

AttributeError: 'gi.repository.Gtk' object has no attribute 'GenericTreeModel'

GenericTreeModel 是否已重命名?

提前致谢。

最佳答案

PyGObject 最近通过 pygtkcompat 获得了 GenericTreeModel 支持.

这是 3.7.90 中的新功能在 3.7.91 中进行了修复

所以现在您应该能够使用兼容模块迁移 GenericTreeModels,至少作为一个开始。

关于python - 带有 PyGObject 自省(introspection) Gtk+ 3 的 GenericTreeModel?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11025700/

相关文章:

python - 当有人解释代码时, 'L' 是什么意思?

windows - 如何在 Windows 上分发 GTK+ 应用程序?

GtkLabel 在水平盒子中垂直展开

python - 在 python 中,我如何迭代具有动态嵌套数的嵌套字典?

Python 封装 : Creating a dependency on a `conda-forge` package in `conda` `meta.yaml` file

python - 在python中使用递归操作json

python - 列表中多个集合的交集

python - 仅给定闭包函数,如何访问闭包变量?

c - GTK+/C : Passing data through g_signal_connect changes the data

python - 清理用户输入以包含在 href 属性中?