本文整理匯總了Python中gobject.TYPE_PYOBJECT屬性的典型用法代碼示例。如果您正苦於以下問題:Python gobject.TYPE_PYOBJECT屬性的具體用法?Python gobject.TYPE_PYOBJECT怎麽用?Python gobject.TYPE_PYOBJECT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類gobject
的用法示例。
在下文中一共展示了gobject.TYPE_PYOBJECT屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: initLeftPane
# 需要導入模塊: import gobject [as 別名]
# 或者: from gobject import TYPE_PYOBJECT [as 別名]
def initLeftPane(self):
global groups
self.treeModel = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT, gtk.gdk.Pixbuf)
self.treeServers.set_model(self.treeModel)
self.treeServers.set_level_indentation(5)
#Force the alternating row colors, by default it's off with one column
self.treeServers.set_property('rules-hint', True)
gtk.rc_parse_string( """
style "custom-treestyle"{
GtkTreeView::allow-rules = 1
}
widget "*treeServers*" style "custom-treestyle"
""")
column = gtk.TreeViewColumn()
column.set_title('Servers')
self.treeServers.append_column( column )
renderer = gtk.CellRendererPixbuf()
column.pack_start(renderer, expand=False)
column.add_attribute(renderer, 'pixbuf', 2)
renderer = gtk.CellRendererText()
column.pack_start(renderer, expand=True)
column.add_attribute(renderer, 'text', 0)
self.treeServers.set_has_tooltip(True)
self.treeServers.connect('query-tooltip', self.on_treeServers_tooltip)
self.loadConfig()
self.updateTree()