简体   繁体   English

导入WebKit会导致应用程序启动失败。

[英]Importing WebKit causes application to fail at start-up.

I'm making an application using Quickly, and I want to add a Webkit widget to my window. 我正在使用Quickly制作应用程序,并且想向Web窗口添加Webkit小部件。 I thought "Should be easy enough", but as always, it couldn't be that easy. 我以为“应该足够简单”,但一如既往,这并非那么容易。

From the moment I add import webkit , the application fails to start. 从添加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

The entire source code can be found here . 完整的源代码可以在这里找到。 The specific file I'm talking about, is this one . 我正在谈论的特定文件就是这个

It seems you are mixing bindings. 看来您正在混合绑定。 If you are already using GObject Introspection, then stay with that. 如果您已经在使用GObject Introspection,请继续使用。 Try: 尝试:

from gi.repository import WebKit

or use the old bindings for GTK (pygtk). 或将旧的绑定用于GTK(pygtk)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM