开发者

Why does python 2.7.2 pygtk segfault parsing a glade GtkButtonBox?

Here are the steps to reproduce my problem: I designed a UI in glade 3.10.0 including a GtkButtonBox containing 4 buttons:

<object class="GtkButtonBox" id="i_bbox">
<property name="visible">True</property>
[...] some children (buttons)

The glade file gets loaded into the开发者_开发问答 python script:

builder_fname = "example_layout.glade"
self.root = gtk.Builder()
self.root.add_from_file(builder_fname)
self.root.connect_signals(self)

When the script gets executed, it segfaults with the following traceback:

./example.py:37: Warning: cannot create instance of abstract (non-instantiatable) type `GtkButtonBox'
self.root.add_from_file(builder_fname)
[1]    5088 segmentation fault (core dumped)  ./example.py

Does someone have an idea how to fix this? I'm using pygtk 2.24.0


The warning seems to hint that you need to use GtkHButtonBox or GtkVButtonBox versus GtkButtonBox ... do those segfault?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜