隐藏后,GtkInfoBar不再显示

时间:2016-08-19 23:42:18

标签: python gtk glade pygobject

我隐藏了Gtk小部件,然后尝试显示它,但没有一种方法" show()"," show_all()"或" show_now()"不起作用。如果不打电话"隐藏()"小部件显示。

python 3.5.2
gtk3 3.20.8
pygobject-devel 3.20.1

test.py:

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

builder = Gtk.Builder()
builder.add_from_file("gui.glade")
infoBar = builder.get_object("infoBar")
window = builder.get_object("window")
window.show_all()

infoBar.hide()

infoBar.show()

Gtk.main()

gui.glade:http://pastebin.com/xKFt1v84