Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 PyGTK 中,gobject.type_register() 做了什么?文件只是说
将指定的 Python 类注册为 PyGTK 类型
嗯,呃。将类注册为 PyGtk 类型有什么作用?
PyGTK 类型可以用作 PyGTK 属性的类型。要让 GObject 类型系统知道,必须注册一个类型。我认为您实际上不必在 PyGTK中调用__gobject_init__此函数,它可能会在您调用.
__gobject_init__
有时 PyGTK 文档过于简洁。在这种情况下,您可能需要阅读C 文档。