版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Jayccccc_chao/article/details/84448340
话不多说,直接整代码。
btn = gtk.Button(“测试按钮”)
child_label =btn.get_child()
# Arail 字体 30字体尺寸
font = ("Arail" 30)
font_desc = Pango.FontDescription(font)
child_label.modify_font(font_desc)
搞定