在经历了几个令人沮丧的小时后,我想做一件简单的事情(在GTK-2中就是这样),我提出了这个问题。很抱歉在这个问题上缺少代码或细节,因为我根本没有工作。在
我正在编写一个应用程序,它从数据库中提取一些数据,并且必须以表的形式显示这些数据。我想是标准的东西。我就是不知道怎么做。没有教程(还有那些教程,对我不管用,因为我的窗口不仅仅是一个列表库)。我在Glade设计我的用户界面,它有一个笔记本,里面有一个网格,里面有各种各样的东西,包括一个列表应该出现的地方。在
我尝试添加一个ListStore对象,但是根本无法显示它。Python2.7.6,Glade 3.16.1。在
self.liststore = self.builder.get_object('liststore1')
self.liststore.append(['1st column','2nd column'])
我不能让Glade中的ListStore作为预览显示,只能将它添加为顶层对象,而不能将其添加到目标位置。在
一个非常基本的列只显示了两个条目。其中一个是在glade文件中创建的,另一个是用python创建的,这样您可以看到如何修改liststore:
空地档案:
这是python文件:
^{pr2}$相关问题 更多 >
编程相关推荐