Glade checkButton总是返回false

时间:2017-10-24 18:32:28

标签: python gtk glade

当我点击按钮时,我正试图获取我的复选框的状态。但是,无论是否勾选方框,它始终打印为False。如何检查框是否勾选?

builder = Gtk.Builder()
builder.add_from_file("GUI.glade")      
checkButton = builder.get_object("checkButton")

def on_submit(self, button):
        status = checkButton.get_active()
        print status

0 个答案:

没有答案