Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 PyGtk 的 IconView,我可以通过调用将图标设置为可重新排序gtk.IconView.set_reorderable(True)。我的问题是检索新订单的最佳方式是什么?也就是说,我应该如何以新顺序访问每个元素的属性?各种迭代器?
gtk.IconView.set_reorderable(True)
我正在使用 gtk.ListStore 来存储数据。
我知道这听起来可能微不足道,但我几乎没有 Python 或 PyGtk(或一般的 GTK)方面的经验,所以我想知道正确的方法!谢谢!
所以,我现在明白了:事实证明,当项目被重新排序时IconView,gtk.ListStore.reorder或者类似的东西被调用。这意味着我需要做的就是使用gtk.ListStore.get_iter()或gtk.ListStore.get_iter_first()解决所有问题。
IconView
gtk.ListStore.reorder
gtk.ListStore.get_iter()
gtk.ListStore.get_iter_first()
多么微不足道!我需要做的就是吃掉它似乎。