opencv_gtk_gui_dev1.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:ghetto_omr 作者: pohzhiee 项目源码 文件源码
def __init__(self,parent):
        Gtk.Grid.__init__(self)
        self.set_border_width(10)

        self.vbox = Gtk.VBox(spacing=6)
        self.vbox = Gtk.Box(spacing=6)
        self.add(self.vbox)

        self.button1 = Gtk.ToggleButton("Button1")
        self.button1.connect("toggled", self.on_button_toggled, "1")
        self.button1.set_active(True)
        #self.button1img = Gtk.Image.new_from_icon_name("filenew", Gtk.IconSize.MENU)
        #self.button1.set_image(self.button1img)

        self.vbox.pack_start(self.button1, True, True, 0)

        self.button2 = Gtk.ToggleButton("Button 2")
        self.button2.connect("toggled", self.on_button_toggled, "2")
        self.vbox.pack_start(self.button2, True, True, 0)

        self.button3 = Gtk.ToggleButton("Button 3")
        self.button3.connect("toggled", self.on_button_toggled, "3")
        self.vbox.pack_start(self.button3, True, True, 0)

        self.attach(self.button1, 0, 0, 1, 1)
        self.attach(self.button2, 1, 0, 3, 1)
        self.attach(self.button3, 2, 0, 1, 1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号