2016-08-19 63 views
3

我隱藏了Gtk窗口小部件,然後嘗試顯示它,但沒有任何方法「show()」,「show_all()」或「show_now()」不起作用。如果不調用「hide()」小部件顯示。GtkInfoBar隱藏後不會再顯示

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

回答