1

我正在使用 Quickly 制作一个应用程序,并且我想在我的窗口中添加一个 Webkit 小部件。我想“应该很容易”,但和往常一样,它不可能那么容易。

从我添加的那一刻起import webkit,应用程序无法启动。

robin@RobinJ:~/Ubuntu One/Python/gtkreddit$ quickly run
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: specified class size for type `PyGtkGenericCellRenderer' is smaller than the parent type's `GtkCellRenderer' class size
  from gtk import _gtk
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:40: Warning: g_type_get_qdata: assertion `node != NULL' failed
  from gtk import _gtk

完整的源代码可以在这里找到。我正在谈论的特定文件是这个.

4

1 回答 1

5

看来您正在混合绑定。如果您已经在使用 GObject Introspection,请继续使用它。尝试:

from gi.repository import WebKit

或使用 GTK (pygtk) 的旧绑定。

于 2012-06-25T17:55:04.697 回答